List folder sizes in Linux

Robert Leong -

If you want to find where all your storage are going to in a Linux box, use the du command.

  1. "cd" into the top level to want to look down from, something like a SAN mount point for example.
  2. Use "du -chs *"  to print out the size of everything in the directory you are logged into.  This includes individual files, directories and all the files in them.  
[root@sbultra-136100027 /]# cd /media/spycer-vol0/
[root@sbultra-136100027 /media/spycer-vol0]# du -chs *
35G     2014_VENICE_DEMO_SYSTEM_CONTENT
7.7T    2b_deleted
2.0G    ANC
83M     Avid
6.0G    DELIVERY
4.0K    Demo
98M     eacl-1525
2.0G    FRIDAY_99
130M    johnl_spycertest
71M     License
105G    MASTERING_COLOR_SCIENCE_JULY2016-UK
600G    NAB_2015_DEMO_CONTENT
262G    New Folder
4.8G    NTC
4.0K    proxies
8.0K    $RECYCLE.BIN
12K     Recycled
29G     robert_temp
11G     RSA_TEMP_DEMO
4.0K    Software
87G     test records
190G    tmp
9.0T    total

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.