Operating System - HP-UX
1849101 Members
7834 Online
104041 Solutions
New Discussion

find whitout going down the directory

 
SOLVED
Go to solution
federico_3
Honored Contributor

find whitout going down the directory


I should use the find command to find some files but I don't want the search to be recursive. I would like the search to stop in the directory I indicate.. whitout going down recursively. How can i perform the task??

Thanks
Federico
1 REPLY 1
James R. Ferguson
Acclaimed Contributor
Solution

Re: find whitout going down the directory

Hi Federico:

By example:

# cd /tmp; find . -path "./*" -prune -name "*.log" -type f

...will return all files ending with ".log" in the /tmp directory but not those in subdirectories.

Regards!

...JRF...