Linux Find and Locate Cheat Sheet/Refresh locate database

Update file index used by locate.

Section: Actions and locate

Refresh locate database

bash
bash
sudo updatedb

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Actions and locate
Locate files using database
Search quickly using updatedb database.
OpenIn sheetbashsame section
Delete old temporary files
Remove matching files directly from find.
OpenIn sheetbashsame section
Run chmod on matched files
Execute a command on each result.
OpenIn sheetbashsame section
Find file by exact name
Search recursively for a specific filename.
Find files larger than 100 MB
Search for large files using size filters.
Find world-writable files
Audit overly permissive files.