find - Search Files in Linux

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

find - Search Files

Search for files and directories by name, type, size, and more

bash
# Find by name
find /path -name "filename.txt"
find . -name "*.js"

# Find by type
find . -type f         # Files only
find . -type d         # Directories only

# Find by size
find . -size +100M     # Larger than 100MB
find . -size -1024k    # Under 1MB (-1M only matches empty files)

# Find and execute
find . -name "*.log" -delete
find . -type f -exec chmod 644 {} \;
✅ -name searches by filename (case-sensitive)
💡 Use -iname for case-insensitive search
🔍 -exec runs commands on found files
⚡ . searches current directory and subdirectories
searchfindfiles

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