How to show folder size in Linux with du command | Netzen Solutions Ltd

How to show folder size in Linux

Home / IT Support / How to show folder size in Linux
23 August 2016, by , in IT Support, Linux, Comments off

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