Thursday, November 21, 2024
HomeUNIXFind a File by Name in UNIX, Solaris, or Linux

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

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

Quinn McHenry
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.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!