linux get folder size with ls code example
Example 1: linux command to list directory size
sudo du -sh /var
Example 2: ls directory size
# With disk usage --summarize and --humanreadable
du -sh *
sudo du -sh /var
# With disk usage --summarize and --humanreadable
du -sh *