media file explorer download upload index folder image licenses menu widget Play Pause profile-settings more dots-two-horizontal dots-two-vertical more-vertical pending google-plus hangouts facebook instagram whatsapp spotify telegram twitter vine renren rss youtube twitch vimeo flickr dribble behance deviantart 500px steam github soundcloud skype reddit linkedin lastfm delicious stackoverflow pinterest xing flattr foursquare yelp World

How To Find Files Using Locate in Ubuntu

It's kind of frustrating when you are searching for a particular file, and you have no idea of how to find it, In this guide, I'll walk you through on two different ways you can find a file in your GNU/Linux server.

Using the Locate

Locate is an awesome utility useful for finding files, to get started with the locate, install it as follows:

sudo apt install locate

Before we start using locate, it is advisable you update the mlocate.db database before first use:

sudo updatedb

mlocate.db is used by locate to store the search indexes. It might take a while for the updates to go through, probably few seconds.

Let's say you are finding a file named notes, but don't know the exact one you are looking for, you can use locate to find all the matching file with name 'notes' for example:

locate notes


james@server:~$ locate notes

As you can see above, it beautifully returns all the matching files that includes the word 'notes'.

Keep in mind that, you need to know the name of the files you are searching for, and it is also case sensitive,the word Notes is different from notes when using the locate command, enjoy.