Find a File by Name in UNIX, Solaris, or Linux

Posted September 2, 2003 by Quinn McHenry in UNIX

Last Updated on

Using the find command, one can 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


About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.

Leave a Reply