Page 1 of 1

general Unix search question (not DS)

Posted: Tue Jul 27, 2004 1:33 pm
by datastage
Can someone remind me how to search for files in Unix and have it search all directories below the current directory? If I want to find wurlod.dat but don't know where it is stored and I am in directory 'A' which has directiries 'B', 'C', and 'D'..and 'D' has 'E', I want to search A thru E for wurlod.dat

HPUX if it matters

Thanks,

Posted: Tue Jul 27, 2004 1:44 pm
by tonystark622
Hi Byron,

I think you can do:

Code: Select all

find <starting directory> -name <filename> -print
So, it would look something like this:

Code: Select all

find . -name wurlod.dat -print
if you're already in directory A

Hope this helps,
Tony

Posted: Tue Jul 27, 2004 2:19 pm
by datastage
Thanks for your help


for some reason I always want to use ls thinking there should be a flag for that command to search through directories.