How to check folder or directory size in Linux/CentOS/Docker container?


The command is: du

To check a directory size summary, and in a friendly format (in MB or GB)
Code:
du -sh <folder-name>

Example:
Code:
[root@devopsrun1 var]# du -sh log
9.9M    log

To check the size of the current directory, you are in, use dot


example:
Code:
[root@devopsrun1 var]# du -sh .
623M    .