Re: [opensuse] Re: Root folder full
Run this as root, from the root folder: du -ax | sort -nr | head -10 (Directory size, sort descending, show only the first 10) It'll tell you where the big space users are :)
"Davi C. Rodrigues" 10/16/13 1:36 PM >>> Hi,
I just noted that my root folder is full, and I neither know why or how to correct the problem. I use opensuse 12.2 with 20 GB for root folder (it was the default). The following result may be helpful: df -h Filesystem Size Used Avail Use% Mounted on rootfs 20G 19G 185M 100% / devtmpfs 16G 36K 16G 1% /dev tmpfs 16G 496K 16G 1% /dev/shm tmpfs 16G 752K 16G 1% /run /dev/sda6 20G 19G 185M 100% / tmpfs 16G 0 16G 0% /sys/fs/cgroup tmpfs 16G 752K 16G 1% /var/lock tmpfs 16G 752K 16G 1% /var/run tmpfs 16G 0 16G 0% /media /dev/sda7 827G 27G 800G 4% /home In the root folder, I see that the folder usr occupies 16.3 GB Thanks for any help. Davi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 10/16/2013 08:41 PM, Christopher Myers wrote:
Run this as root, from the root folder: du -ax | sort -nr | head -10
(Directory size, sort descending, show only the first 10)
It'll tell you where the big space users are :)
This is not related to the OP's problem, but to the hint above and about using coreutils programs. 1) sort(1) knows the -h, --human-numeric-sort option to compare human readable numbers (e.g., 2K 1G). Therefore, you can use du(1)'s -h option: $ du -ahx | sort -hr | ... 2) The syntax 'head -NUM' is highly deprecated. Please teach yourself to always explicitly use -nNUM instead: $ du -ahx | sort -hr | head -n10 See also - as head(1) and tail(1) are sisters: http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Old-tail-plus-N... 3) Instead of reverse sorting and using head(1), you could also use tail(1): $ du -ahx | sort -h | tail -n10 By this, you can save again the 1 additional character you have type more since hint 2. ;-) 4) BTW: In coreutils >= 8.21, i.e. in openSUSE >= 13.1, du(1) has learned the new --threshold option to filter files or directories smaller or greater than a certain limit: $ du -hx --threshold=1G / 1.7G /usr/lib64 1.8G /usr/share 4.6G /usr 5.9G / Info page: http://www.gnu.org/software/coreutils/manual/html_node/du-invocation.html#du... 5) And in the next coreutils release, du(1) will also accept the --inodes option to display the number of files (and directories) in the tree below. (It's too late for this to go into 13.1, obviously, but maybe this will go into 13.2.) Again from the info page: Here's how you would use `--threshold' to find directories on the root file system with more than 20000 inodes used in the directory tree below: du --inodes -x --threshold=20000 / Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Bernhard Voelker
-
Christopher Myers