Sometimes it’s very useful to view exact folder sizes in Linux from the command line/terminal. You may wish to know which folders are using up all the space, and use the below command to check.
To list the size of all individual folders/files in Linux in the current directory in human readable sizes like KB/MB/GB:
du -sh *
To list the size of all individual folders/files in Linux at a set path locationĀ in human readable sizes like KB/MB/GB:
du -sh /path/*
To list the total size of the files/folders in the current directory in Linux in human readable sizes:
du -sh
To get a total at the bottom of the size of folders/files in Linux from current directory:
du -shc *
To see the total size of the file system disks in human readable output:
df -h