How do I get the folder size from the terminal in Ubuntu?

How do I get the folder size from the terminal in Ubuntu?

Author: korytoff, 2010-10-25

3 answers

du -h -s /full/path/to/folder/

Example output for a folder with subfolders:

669M idea-IC-162.1812.17

 25
Author: heroys6, 2016-09-03 08:54:03

To get the folder size, use the du command.

Team.

du -h --max-depth=1 | grep папка

Conclusion.

158M    ./папка
 17
Author: stanislav, 2010-10-25 11:24:51

It can be even simpler

du -h <имя-директории>
 13
Author: skegg, 2011-03-04 00:12:33