find — searching for files
cheat sheet · GNU findutils https://lab.dimsanych.ru/en/wiki/find/Cheat sheet
-
find /etc -name nginx.confexact name, search from /etc -
find ~ -type f -name site.conffiles only, no directories -
find . -name "*.log"by pattern (quote the pattern!) -
find . -type f -size +100Mlarge files -
find . -mtime -1modified in the last day -
find . -name "*.tmp" -deletedelete (test without -delete first!) -
find . -type f -exec chmod 644 {} +mode 644 for every file found -
find . -printf '%s %p\n' | sort -rn | headtop by size -
find . -path './node_modules' -prune -o -name '*.js' -printexcluding a directory
Options
Below are the main conditions and actions of find; the full list is in man find.