Note:
- du command hides hidden files. A more convenient command is ‘ncdu‘
sudo apt-get install ncdu
- Please refer to his link :
- To find whats contributing to the disk usage on a specific filesystem (
/dev/sda2)
- This can be tricky because there would be other filesystems mounted underneath
/
- I have found the package ‘xdiskusage‘ very useful for this.
- This problem is discussed here
- This can be tricky because there would be other filesystems mounted underneath
- If i need to look up directory sizes only till 1 layer, then the following command is useful:
- the ‘-s’ flag is useful to summarize the contents on directory
$ du -csh *
52K Desktop
4.0K Documents
4.0K Downloads
0 media
4.0K Music
353M notebooks
4.0K Pictures
4.0K Public
4.0K Templates
947M transferLearning
4.0K Videos
1.3G total
References:
https://www.cyberciti.biz/faq/checking-directory-size-in-linux-command/