2

df -h gives me the following

Filesystem      Size  Used Avail Use% Mounted on
rootfs           15G   14G  457M  97% /
/dev/root        15G   14G  457M  97% /
devtmpfs        211M     0  211M   0% /dev
tmpfs            44M  204K   44M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            88M     0   88M   0% /run/shm
/dev/mmcblk0p1   56M   19M   38M  34% /boot
tmpfs            88M     0   88M   0% /tmp

while sudo du -hsx * | sort -rh in root directory gives me this

du: cannot access `proc/2331/task/2331/fd/4': No such file or directory
du: cannot access `proc/2331/task/2331/fdinfo/4': No such file or directory
du: cannot access `proc/2331/fd/4': No such file or directory
du: cannot access `proc/2331/fdinfo/4': No such file or directory
1.4G    usr
239M    var
53M     lib
37M     opt
19M     boot
7.3M    home
6.7M    sbin
5.9M    bin
4.4M    etc
216K    run
20K     media
16K     root
16K     lost+found
4.0K    srv
4.0K    selinux
4.0K    mnt
0       tmp
0       sys
0       proc
0       dev

To me this doesn't add up, where are the 14GB in use?

It's a Raspberry Pi Model B with pure Raspbian and only one little python-tool installed (pyLoad), nothing else really.

  • 1
    If you suspect that to used space is wrong, you should probably run a fsck on root fs. You can force a fsck on reboot with this command : shutdown -rF now – sfk Mar 8 '14 at 22:00
  • I did that but that didn't really change anything. – plunz Mar 10 '14 at 18:43
  • 1
    Maybe an open-then-delete file ? see unix.stackexchange.com/questions/34140/… – sfk Mar 10 '14 at 21:23
  • Did you expand your filesystem? – el3ien Jul 17 '16 at 11:44
1

You are using the du command incorrectly, which also explains why you are getting those error messages about /proc. Presumably you want to see what is in the root filesystem but nothing mounted under it, so you should say du -shx /. The * would have missed any directories in / starting with a period.

0

You could use ncdu instead of du, it provides a nice interactive terminal UI. It should be in the repository as "ncdu" (apt-get install ncdu in apt systems).

Default behavior is to scan the current directory and sort by size. You can tell it to scan a different directory such as / with sudo ncdu /.
You can use the arrow keys to navigate the displayed file tree. left arrow moves to previous directory, up and down select a listed directory or file, and the right arrow moves to the selected file if it is a directory.

$man ncdu

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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