locate command on Linux

Written by Yujin Boby

Edit in WordPress

locate command find files on a linux server.

To install locate, run

On CentOS

yum install mlocate

On Debian/Ubuntu

apt install mlocate

locate searches through a static index of files. This is rebuild daily using cronjob. You can manually update it by running

updatedb