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.

Have a Unix Problem
Do you have a UNIX Question?

Unix Books :-
UNIX Programming, Certification, System Administration, Performance Tuning Reference Books

Return to : - Unix System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.