Find a file in Linux

Finding file in Linux is very convenient with the locate utility (remember to run sudo updatedb before using it to have the latest file index). Nevertheless I find it often ineffective and irritating for a number of reasons.

Another (and possibly better) way to find a file is to use find.

Enclose the file name in single quotes, if you have to.

For example:

find /home/user -name myfile.txt

or

find /home/user -name 'this is my another file.txt'
Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.