Locate Command - Search Files by Name - Linux CLI

4,611 views · Published 5 June 2012 · 13:54 · Indexed 5 October 2026

Channel: gotbletu · 2012 · Science & Technology

Watch on YouTube

Name           : mlocate
Version        : 0.25-1
URL            : http://carolina.mff.cuni.cz/~trmac/blog/mlocate
Description    : Faster merging drop-in for slocate
locate - find files by name
       locate reads one or more databases prepared by updatedb(8) and writes file names matching at least one of the PATTERNs
       to standard output, one per line.

       If --regex is not specified, PATTERNs can contain globbing characters.  If any PATTERN contains  no  globbing  charac‐
       ters, locate behaves as if the pattern were *PATTERN*.

       By default, locate does not check whether files found in database still exist (but it does require all parent directo‐
       ries to exist if the database was built with --require-visibility no).  locate can never report  files  created  after
       the most recent update of the relevant database.

to update ur database:`
sudo updatedb

or for visual
sudo updatedb -v

to add external drives, edit out the /media :
sudo nano /etc/updatedb.conf

discover function, add to ur bashrc/zshrc if u want to use it
https://github.com/gotbletu/shownotes/blob/master/locate_discover.txt

regular expressions
http://www.linuxplanet.com/linuxplanet/tutorials/6841/1
http://linux.about.com/od/lts_guide/a/gdelts66t01.htm

More from this channel