How to come out of this


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to come out of this
# 1  
Old 11-23-2008
Question How to come out of this

Hi,

i have to search for all files named FILE in my particular directory, which is /abc.

when i am using 'find /abc -newer file2 -print | xargs ls -ld | grep 'FILE'

this gives me all the files but the problem is, it takes all the files which comes under /abc/def also and all other diirectory for the same file name FILE.

i want to restrict my search to this particular directory, and i need all FILE under only /abc, not /abc/def

can someone please guide me on this.
# 2  
Old 11-23-2008
have a look at the '-prune' option in the find man page
# 3  
Old 11-23-2008
it works , Smilie

thanks so much
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question