Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-27-2007, 01:19 AM   #1
Registered: Oct 2007
Posts: 160

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

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

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

Original Poster
Rep: Reputation: 30

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.


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 08:53 AM
find lists current directory kaprasanna Linux - General 3 12-17-2007 04:06 AM
find in current directory ramanadyv Linux - Newbie 3 03-28-2006 10:12 PM
How to recursively rename files using their directory name pattern ceg4048 Linux - General 2 09-28-2005 01:16 PM
how do I find out the current working directory? nodger Programming 2 12-26-2004 11:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:00 PM.

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