how to check size of dir in linux code example Example 1: linux command to list directory size sudo du -sh /var Example 2: check folder size in linux terminal du -sh /home/user/