Main / Find
Pipe superfluous output to nullfind <directory> -name <pattern> 2>/dev/null NotesThe ! is a NOT for the find command. To return only executable files, use -type f -executable options. For directories use -type d. To ignore case, use -iname For files greater than a certain size, use -size +100M for example for greater than 100MB. RecipesTo find all the C/C++ source files and headers: find . -type f -regex ".*\.*[ch]\(pp\)?$" To find all the files modified in the last 10 minutes, use find . -mmin -10 Using wildcard *The command find . -name *.c will NOT work because expansion happens before the argument is passed to find. Instead, you must use find . -name "*.c" |