Find Disk Usage in Linux
du command shows disk usage.
1 |
du -h --max-depth=1 |
If you want to sort the result, see How to sort the result of du -h command
To see disk usage on the current partition only, run
1 |
du -hx --max-depth=1 |
To sort by disk space
1 |
du -k --max-depth=1 | sort -n |
To display top 20 largest folder/files
1 |
du -ahx . | sort -rh | head -20 |