Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find command

Status
Not open for further replies.

minus0

Programmer
Feb 20, 2003
73
US
Hi all,

How do I make the Find command not traverse the sub directories? I tried using the "prune" option but no success there. Can some one suggest the actual command
I tried

find . -name "xfile*" -prune subdirectory -mtime -5

with the intention of preventing the find command from going to "subdirectory" but in the results I still see the files that are in the subdirectory

thanks for any help
 
Hi,

Can you try this instead:

find . -name "xfile*" -o -name subdirectory -prune -mtime -5

regards,
feroz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top