find - Search the Live Tree

find - the workhorse

Scenario: "There's a rogue 4GB file somewhere under /var eating the disk - find it." This is a real ticket, and find is how you close it in seconds.

find walks a directory tree in real time and matches files against tests.

find  <where>   <test>
find  /var      -name '*.log'
CommandFinds
find . -name report.txtExact name under current dir
find /etc -iname '*.conf'Case-insensitive, wildcard
find /home -type dDirectories only (f = files)
find . -emptyEmpty files/dirs
$ find /etc -name '*.conf' | head -3
/etc/ssh/ssh_config
/etc/logrotate.conf
/etc/ld.so.conf
Tip: Quote your wildcards: find . -name '.log' (with quotes). Unquoted, the shell expands .log before find ever sees it, and you get confusing errors.