locate - Fast File Search in Linux

From the Linux Commands cheat sheet · Search & Find · verified Nov 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 -l 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

Continue with Linux Commands

Save the full cheat sheet or work through every related task.

More Linux tasks

Back to the full Linux Commands cheat sheet