0

This question already has an answer here:

My disk is almost full, how can I know where takes away the most disk?

Because yesterday the disk is enough for my System.

[root@ha-node1 log]# df -lh 
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        18G   18G  4.3M 100% /
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           3.9G   54M  3.8G   2% /dev/shm
tmpfs           3.9G  383M  3.5G  10% /run
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sdc         20G   45M   19G   1% /mnt/sdc
/dev/sdb         20G   83M   19G   1% /mnt/sdb
tmpfs           781M     0  781M   0% /run/user/0

marked as duplicate by Jeff Schaller, Kusalananda, Thomas Dickey, Jenny D, Stephen Rauch Aug 19 '17 at 14:35

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.

1

Use du. Use -x to prevent recursion into other mount points. You can limit the output using --max-depth=N. Human readable format (e.g., 1K 234M 2G) is enabled by -h.

Output can be sorted by piping to sort.

For example:

du -x --max-depth=3 -h / | sort -h
1

I recommend ncdu: https://dev.yorhel.nl/ncdu:

Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote server where you don't have an entire graphical setup available, but it is a useful tool even on regular desktop systems. Ncdu aims to be fast, simple and easy to use, and should be able to run in any minimal POSIX-like environment with ncurses installed.

ncdu will present a list of directories sorted by their size, for example:

https://dev.yorhel.nl/img/ncdudone.png

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