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

How to find files without knowing which directory to search 1

Status
Not open for further replies.

ProgrammingB52

Technical User
May 7, 2003
37
US
I am trying to find files. I have the file names and tried a find . -name in root. The files weren't in root and I dont know what directories to search. Is there a way I can search them all?
 
The

find . -name <filename>

should search all directories in root and beyond, including all subdirectories/filesystems. Perhaps the files aren't actually there. You could also try a

find . -name '*part_of_name*'

in case your filenames aren't quite correct. HTH.
 
A full search of your hard disk may take a while, but it will certainly find a filename if you want to.

You could speed the search a bit by specifying to search only filenames (as opposed to filenames, devices, directory names, etc..)

Code:
cd /
find . -type f -name &quot;*filename*&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top