Find a file by name in UNIX/Solaris/Linux

Home -> UNIX

45001 views

From the computer of: qmchenry (338 recipes)
Created: Sep 02, 2003     Updated: Dec 01, 2003


Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

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

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  Unix/Linux: Easily find or search files or directories
  Delete Solaris files older than a certain date and time
  Login to Solaris desktop from Windows using Cygwin
  UNIX: advanced octal file permissions with chmod
  Determine Linux version
  How to upgrade Firefox in Linux
  Convert Unix lines breaks to Macintosh line breaks
  Find help with man pages
  Mount an ISO file in Linux
  Convert DOS line breaks to Unix line breaks

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.