How to watch a directory size in Linux Shell

How (only) to show the size of the directory. LS command may show more trivial infos I don’t need.

DU command can do it. DU is “du – estimate file space usage”. Users could use ‘–max-depth=N’ parameter to print the level of information. One example is as follows.

$ du -h --max-depth=0 hummer-svn
11G	hummer-svn
Answered by harryxiyou.

Weiwei Jia

Weiwei Jia is a Ph.D. student in the Department of Computer Science at New Jersey Institute of Technology since 2016. His research interests are include storage systems, operating systems and computer systems.

Leave a Reply

Your email address will not be published. Required fields are marked *