find (Pete's notes)

It's sometimes useful to search all the files on a system. Trouble is, the "find" command sometimes hangs while it is scanning the /proc directory. To search for the string "fixresolv" in all non-directory files, whil skipping /proc and /dev, here is the syntax:
find / \
-path '/proc' -prune -o \
-path '/dev' -prune -o \
-path '/sys' -prune -o \
-path '/selinux' -prune -o \
-type f \
-exec grep -l fixresolv {} \;

FINDING THE LARGEST FILE

Did you ever fill up a filesystem and want to know what large files are consuming the space. This will sort the largest files, top to bottom.

find /var -mount -ls -xdev | /usr/bin/sort -nr +6 | more

Pete Siemsen
Last modified: Mon Jul 11 09:58:49 MDT 2005