Find a file by name in UNIX/Solaris/Linux

Contributor Icon Contributed by qmchenry Date Icon September 2, 2003  
Tag Icon Tagged: UNIX

Using the find command, locate a file by name


To find a file such as filename.txt anywhere on the system:

find / -name filename.txt -print

Recent operating system versions do not require the print option because this is the default. To limit the search to a specific directory such as /usr:

find /usr -name filename.txt -print

Previous recipe | Next recipe |
 

Viewing 3 Comments

 
close Reblog this comment
blog comments powered by Disqus