command line check directory size code example Example 1: command line calculate folder size du -sh /directory/path Example 2: size folder command line du -h /path/to/folder/