Linux find Commands
Here are some useful commands on SecurePlatform to find specific files. They are generic across linux so they are not limited to just SPLAT.
find / -size +10000k (Find any file larger than 10000K)
find $FWDIR -name ‘*.elg’ -size -500k (Find *.elg files smaller than 500k)
find /home/david -mtime -2 -name ‘*.c’ (Find files modified less than 2 days ago)
find /home/david -mmin -10 -name ‘*.c’ (Find files modified less than 10 mins ago)
find $FWDIR -name *.C -exec grep “pattern” ‘{}’ /dev/null ; -print
(Find ”pattern” in *.C files under $FWDIR)
du –k
This will display the size find / -size +10000k (Find any file larger than 10000K)
find $FWDIR -name ‘*.elg’ -size -500k (Find *.elg files smaller than 500k)
find /home/david -mtime -2 -name ‘*.c’ (Find files modified less than 2 days ago)
find /home/david -mmin -10 -name ‘*.c’ (Find files modified less than 10 mins ago)
find $FWDIR -name *.C -exec grep “pattern” ‘{}’ /dev/null ; -print
(Find ”pattern” in *.C files under $FWDIR)
du –k
This will display the size of all folders beneath
The man page contains more information and there are several very good online tutorials for find available.of all folders beneath
20 largest entries. ”/” will show all directories on all filesystems. ”$FWDIR” will only show directories therein.