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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find question

Status
Not open for further replies.

nimrodman

MIS
Nov 22, 2005
43
US
How can you use find and not have it traverse sub directories, I tried using -prune to no success, any suggesions?


I have searched the forum's database without success at finding solution to my question.
 
Perhaps you didn't find this?
thread822-884606

HTH,

p5wizard
 

On a Linux system, if you place a '/*' after the name of the directory you are interested in and use the -prune, it should give you what you want. For example,

Code:
find /usr/* -prune

will list what it finds in the directory /usr and it will not decend into the directories under /usr.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top