how to get folder size in terminal code example Example 1: ubuntu get folder size du -hs /path/to/directory Example 2: size folder command line du -h /path/to/folder/