LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 12-27-2007, 02:19 AM   #1
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
Question how to find files in current directory only (not recursively)


hi
how to find the files using find command in current directory only without searching recursively inside the directories.
 
Old 12-27-2007, 02:23 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,167

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
I think setting -maxdepth 1 should do it, if I understand your question correctly.
 
Old 12-27-2007, 02:30 AM   #3
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
thanks

it works but i dont understand the output when -maxdepth is set to zero

[bala@localhost ~]$ find -maxdepth 0
.


what does the . (current directory ) signify.i expect the output to be nothing.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to recursively delete *.xtension files from a directory structure kpachopoulos Linux - General 6 08-24-2008 09:53 AM
find lists current directory kaprasanna Linux - General 3 12-17-2007 05:06 AM
find in current directory ramanadyv Linux - Newbie 3 03-28-2006 11:12 PM
How to recursively rename files using their directory name pattern ceg4048 Linux - General 2 09-28-2005 02:16 PM
how do I find out the current working directory? nodger Programming 2 12-26-2004 12:28 PM


All times are GMT -5. The time now is 05:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration