Find Command TLDR Cheatsheet
Search for files and directories:
find <path> <options>Find regular files/folders:
find <path> -type f
find <path> -type d Find by name (case-insensitive):
find <path> -iname "<pattern>"Find files larger than 10MB:
find <path> -size +10MRun a command on each found file:
find <path> <options> -exec <command> {} \;Examples using -exec (delete found files):
find <path> -type f -name "*.log" -exec rm {} \;Move files to another directory
find <path> -type f -name "*.txt" -exec mv {} /destination/dir/ \;Syntax for -exec (multiline and same line)
-exec cmd {} \; # {} the placeholder for file
-exec cmd {} + # cmd file1 file2 file3 (on the same line)