Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
What is taking up so much space on my disk, beside the filesystem?

I asked this on stackoverflow, but maybe here is a better place.

On my ubuntu 11.10, /dev/sda3 (150GB) is mounted on / and /dev/sda1 (80GB) is mounted on /home. My entire disk has 250GB and the system is reporting I am running out of disk space. Here is the output of df -h:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             149G  141G     0 100% /
udev                  3.9G  4.0K  3.9G   1% /dev
tmpfs                 1.6G  860K  1.6G   1% /run
none                  5.0M     0  5.0M   0% /run/lock
none                  3.9G  508K  3.9G   1% /run/shm
/dev/sda1              74G   15G   56G  21% /home

Ubuntu disk usage analyzer report the same thing. But this is weird because I believe I never used that much space on /. I also check every individual directory under / ( exclude /home ), and they don't use that much space:

8.8M    bin
4.0K    dev
0   initrd.img
0   initrd.img.old
828M    lib
15M lib32
4.0K    lib64
4.0K    media
0   proc
9.2M    sbin
0   sys
1.1G    var
108M    boot
18M etc
4.0K    mnt
40K root
4.0K    selinux
72K tmp
0   vmlinuz
0   vmlinuz.old
16K lost+found
133M    opt
1004K   run
4.0K    srv
5.9G    usr      

Any one could give me some idea what is using up the space? Thanks in advance.

one thing to add is that I turned the ufw log to full, then I noticed some extreme large log files. But I deleted the log files and turned the ufw log to low again. not sure if that's the problem.

share|improve this question

marked as duplicate by RolandiXor, John S Gruber, hbdgaf, Mitch, Uri Herrera Aug 24 '12 at 6:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers 2

up vote 5 down vote accepted

ls -sh does not report sizes as you'd expect. It does not look inside the directories, and just reports then at some fixed size (usually, 4,0k)

There are many tools to check what is taking space on your disk. I'd recommend gdmap. It will show you a self-explanatory map of your disk

To install:

sudo apt-get install gdmap

to run, use

sudo gdmap -f / , if you want to check the whole disk

sudo gdmap -f /some/folder, to check some specific folder

share|improve this answer
I just added the sudo to the programs. The advantage is that some dirs that a normal user could not enter, root can. Therefore, the measurements are more accurate. Should you want to run gdmap on your /home/you , sudo would not be necessary –  josinalvo Jul 14 '12 at 15:57
gdmap is a cool tool, I'll keep it for future use. What happened is that I left the machine running and when I came to the office today, df -h now reports the right disk usage now: /dev/sda3 149G 8.3G 133G 6% /. I guess the problem is because of the log files, but I did delete then then, so I don't really know what's going on. Thanks for the suggestion, though. –  qkhhly Jul 15 '12 at 19:01
maybe there was a program still writing to or reading them. Linux preserves such files till the program releases them (in this state, the files cant be found by new programs, like, say, nautilus) –  josinalvo Jul 16 '12 at 14:19
add comment

Instead of installing an additional tool on your computer, you can use the built-in and decent "Disk Usage" (baobab is its executable).

share|improve this answer
if you do, go to edit>preferences and ensure that it wont read your thumbdrive. But gdmap gives much more information, and is much cuter =P –  josinalvo Jul 14 '12 at 16:11
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.