4.3.5. locate
— find files using their names#
Search for files using their file names. This method is quick as it uses a file name database.
For example:
locate bashrc
Output:
/etc/bash.bashrc
/etc/skel/.bashrc
/home/user/.bashrc
...
Note
This method might not find files that were created or modified recently.
Newer files might not yet be included in the database. To update the database manually, you can run the command:
sudo updatedb
Alternatively, you can use the find command to search for new files.