Firstly, you must find out what is eating away at your space. I'd suggest you track down the physical file or directory that grows to that size.
The simplest way would be to check the directories in /
using: ( I'd suggest running it as root )
# du -hs /* 2> /dev/null
4.2M /bin
25M /boot
204K /dev
6.7M /etc
19G /home
112M /lib
16K /lost+found
12K /media
16K /mnt
4.0K /multimedia
1018M /opt
0 /proc
15M /root
8.6M /sbin
12K /srv
4.2M /storage
0 /sys
108K /tmp
16G /usr
4.3G /var
Now, You run that when the computer has freshly started and has not started to eat space yet and you save the output in a file ( ~/record-space
)
$ sudo du -hs /* 2> /dev/null 1> ~/record-space
And then when your computer is nearing a "FULL" state, you can run the command again saving the output in a second file.
$ sudo du -hs /* 2> /dev/null 1> ~/record-space2
Now you can compare these two files ( ~/record-space
and ~/record-space2
) to see how th e main directories differ...
My favourite way of comparing files is using diff
:
$ diff ~/record-space{,2}
update: See Gille's comment to this answer.
Instead of du -hs /*
, rather use du -xsh /tmp/* /var/*/* ~/.*
.
/tmp
) – Michael Mrozek Nov 13 '10 at 05:09/var/logs
? – fox Nov 13 '10 at 06:00/tmp
; in particular, if you delete/tmp/.X11-unix/X0
, you won't be able to start GUI programs. If you see a large file there, try to work out who is using it, don't delete it if you're not sure you can do it safely. – Gilles 'SO- stop being evil' Nov 13 '10 at 12:15