Discussion Locked

Disk space

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I have a problem with my LINUX system.My free disk space has been reducing over a period of time.When I use the command df -v, I see that the volume of amount of used space on the root partition is growing rapidly and now stands at 90%.I use my machine as a mail server and also run squid on the same machine.I sometimes clear undownloaded mail but it does not help much.Is there a way I can safely clear log files or anything that might be causing this problem.I have not installed any new programs for sometime

3 replies

by joematus

This command will help you find your large files:
find / -xdev -size +1024 -exec ls -al {} \; | sort -r -k 5

Then you decide if you need those files. Log files are just log files. It's up to you if it's needed.

You can also do du -ks on directories to see the size of directories.

by techrepublic

du -k |sort -rn|head -40

Also check that you are rotating all of your worst offending logs... Set up a cron job to automagically can old logs, after say a month - whatever works best for you.

by bmitchel

Another thing to consider is that some files might be open, and being written to, but not flushed out yet - thereby making the file system *think* that it's getting full.

You can use the 'lsof' command to list the open files per process, and see if you can correlate that listing with a listing of open files (possibly by checking the size of the inodes that are listed as being open)

This discussion is closed to new replies.