locate - Fast File Search in Linux

From the Linux Essential Commands cheat sheet · Search & Find · verified Jul 2026

locate - Fast File Search

Quickly find files by name using pre-built database

bash
# Search for file
locate filename.txt

# Case-insensitive
locate -i filename.txt

# Update database
sudo updatedb

# Limit results
locate -n 10 filename.txt
✅ Much faster than find (uses database)
💡 Run updatedb to refresh file database
🔍 May not find recently created files until updatedb runs
searchlocatefast

More Linux tasks

Back to the full Linux Essential Commands cheat sheet