Drives get full fast how to manage them

My /usr and /var get full all the time. How canI tell what is filling up the drive and keep it under control?
what command can asl show files in a tirectory say like the top 10 largest files?

root@diamond [~]# df -ahk
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda5              1035660    496460    486592  51% /
none                         0         0         0   -  /proc
none                         0         0         0   -  /sys
none                         0         0         0   -  /dev/pts
/dev/hda1                77749     20299     53436  28% /boot
none                    516248         0    516248   0% /dev/shm
/dev/hda8            142394868  39061064  96100540  29% /home
/dev/hda7              1035660     33484    949568   4% /tmp
/dev/hda2              4127108   3259464    657996  84% /usr
/dev/hda3              4127108   2325544   1591916  60% /var
/dev/hdc1            158309288  56591452  93676104  38% /backup
none                         0         0         0   -  /proc/sys/fs/binfmt_misc
root@diamond [~]# w
 09:43:45 up 14 days,
LVL 3
jbrashear72Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rindiCommented:
/usr normally doesn't fill up without you installing software yourself.

/var on the other hand has many things that can fill up. First look in the /var/log folder, you'll see log files allways getting larger. The easiest way to control these is to manage them with webmin. Webmin is a administration tool for linux you can use for many things, one of them is you can rotate log files (keep them at a manageable size, archive the older versions so they don't use as much space, and delete those that get too old).

http://webmin.com

depending on what you are running on that PC, there are other folders inside /var that can fill up, mainly those in your cache folder.

I usually use midnight commander to view details. You can set the sort order to sort by file size. Depending on your distro you might have it already installed. enter mc in a terminal window to find out...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jbrashear72Author Commented:
Not the answer i need..
paullamhkgCommented:
/var keep lots of stuff as rindi said cache folder is one of it, also the /var/log will keep the system log, such as security, mail etc.... which depend on what application installed and how they handle the log files.

/usr mainly maintain the system program and the applications, so if you install lots of applications which might fill up the /usr also if your application keep the log file in /usr/appication/log will also fill up the /usr

so what's the size of the partition of /var and /usr ??

can you post the df -h here.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.