Linux Quickie: Fast File Indexing = Fast File Locating

Search for files more efficiently by using fast file indexing. This quickie shows you how to index files. 

Fast file indexing has become a best-practice in Linux since it’s an efficient way to search for files.

To Search the files via the index you need to index the files first, by using the command $ sudo updatedb.  Now that the files are indexed you can search them (or locate them) with the command locate. For example if you’re looking for a test.conf use $ locate test.conf.

If you’re interested in a more in-depth discussion on indexing and finding files, you should check out this unix.stackexchange question (find vs locate), where user Warren Young explains what both do and which is better for what purpose.

More Linux Quickies