Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We had our Samba server (Ubuntu 8.04 LTS) share fill up the other day, but when I went to look at it I could't see any of the shares have too much on them.

We have 5 group shares and then each user has an individual share.

One user has 22 GB of stuff. A few others have 10-20 MB of stuff and everyone else's are empty.

So maybe like 26 GB total.

I deleted a few files yesterday and freed up about 250 MB of space. Today when I checked it it was completely full again and I deleted some older files and freed up about 170 MB of stuff, but I can watch it slowly creep down in free space.

I keep running a df -h

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1            241690180 229340500    169200 100% /
varrun                  257632       260    257372   1% /var/run
varlock                 257632         0    257632   0% /var/lock
udev                    257632        72    257560   1% /dev
devshm                  257632        52    257580   1% /dev/shm
lrm                     257632     40000    217632  16% /lib/modules/2.6.24-28-generic

What can I do to try to hunt down what's taking up so much of my HDD? (I'm fairly new to Unix in general so I apologize if this is not well explained.)

After running a sudo du -sch * I got the following.

root@MON-PDC:/# sudo du -sch *
5.2M    bin
106M    boot
0       cdrom
136K    dev
16M     etc
du: cannot access `home/administrator/.gvfs': Permission denied
216G    home
4.0K    initrd
0       initrd.img
0       initrd.img.old
767M    lib
16K     lost+found
12K     media
4.0K    mnt
4.0K    opt
du: cannot access `proc/7311/task/7311/fd/3': No such file or directory
du: cannot access `proc/7311/task/7311/fdinfo/3': No such file or directory
du: cannot access `proc/7311/fd/3': No such file or directory
du: cannot access `proc/7311/fdinfo/3': No such file or directory
0       proc
436K    root
6.8M    sbin
4.0K    srv
0       sys
100K    tmp
2.0G    usr
492M    var
0       vmlinuz
0       vmlinuz.old
219G    total

I noticed that Home is taking up 216 GB.

So I checked that out the home directory and there is a user that shows as 209 GB of data.

But when I run the du -sch * command from under his dir I get only 23 GB of data.

What am I missing?

share|improve this question

You could repeatedly use the du command to find out the directory that's filling up.

cd /
du -sch *

Then cd to the suspected directory and do another du -sch *

Keep repeating until you find the culprit.

share|improve this answer
/var/ where lots of the log files are kept is a probable culprit. – Jarvin Jun 16 '10 at 18:49
home has 216g of space how do i figure out what in home is such a hog? – Crash893 Jun 16 '10 at 19:09
okay here is where im getting confused. I hunted it down to a user Matt, when i do that du command on the high level of matts dir i get he is useing 209G but when i go into his direcotry the total only shows 23g – Crash893 Jun 16 '10 at 19:11
@Crash893 Some programs treat files/directories that start with a "." as "hidden", it might be in one of those. – Jarvin Jun 16 '10 at 23:34


sudo du -h /home

you can limit the depth of displayed directories by appending the option --max-depth=n where n is the desired depth.

The command you tried used * to select the files to analyze. Files beginning with a dot (.) won't be selected. If you call du on a directory it will recurse in to all subdirectories, even the hidden ones (with a dot).

share|improve this answer
up vote 1 down vote accepted

It turned out there was a .recycler folder in each of the Samba user directories.

I didn't see them with a ls but I can see them with a ls -a.

share|improve this answer

If you want a visual way of viewing the size of everything as it stands now, you could try filelight, which is a free disk-space analyzer, that has a pretty slick visual way of displaying the data and digging into it.

share|improve this answer
ubuntu has a visual analyzer built in but i feel like its not showing me something – Crash893 Jun 16 '10 at 19:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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