linux space used by directory code example Example 1: linux how to see directory data usage du -hs * | sort -rh Example 2: linux command to list directory size sudo du -sh /var