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


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

Leave a Reply

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

You are commenting using your 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 )


Connecting to %s

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