Find the HOG

Feb 17, 2022 16:52

Find the Hog

If your users keep using up all the space in your home directory, here is a way to apprehend the top offenders.

cd /home
du -ks *|sort -nr|pg

(Note: The "k" option may not be necessary in non-posix systems.)

This string will show you all the directory sizes in order, largest first. Now if you are going to do a little cleanup yourself, in one of those directories run:

ls -ls|sort -nr|pg

This will list files by size largest first. That way when you do your compress, move, or remove, you may actually reclaim a significant amount of space.

unix, linux, hog

Previous post Next post
Up