Month: December 2012

Linux #4: Difference between find, locate and whereis

Difference between find, locate and whereis linux commands find: finds files by filename. see Linux: Search for a File by Filename for more details and example usages.
locate: also finds files by filename but does not search the directory structure itself but only a database prepared by updatedb. Because of that locate is faster than find but less accurate. Examples:
locate firefox # -> /etc/firefox # /etc/firefox-3.0 # /etc/firefox-3.5 # /etc/alternatives/firefox-homepage # /etc/alternatives/firefox-homepage-locales # [ .