finding the largest files within a directory

I was shown this maybe my second day on my first job with the title “System Admin”. It worked on Solaris 2.4, and has continued to be useful through AIX, HPUNIX, Red Hat, Ubuntu, Debian, Gentoo, Crunchbang, other variants of Solaris, BSD, etc. One of the best parts of being a UNIX sysadmin instead of…

Continue Reading

removing older files with find

find . -mtime +7 -exec rm {} \; This finds and deletes files with a modified time exceeding 7 days… Every once in a while this becomes hugely necessary in pruning older logfiles, Since it has an “rm” command in it, I always look for the exact syntax and test. –doug

Continue Reading