Difference between revisions of "Linux command: du"

From RHS Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 15: Line 15:
 
  du -shc info2bach*
 
  du -shc info2bach*
 
  du -sh /*
 
  du -sh /*
 +
du -sch .[!.]* * |sort -h  # Show folders & files size at current folder
 +
 +
=== List large files ===
 +
du -sh ./* | grep -E '^[0-9]{0,9}\.?[0-9]{1,3}G'

Latest revision as of 17:05, 12 August 2018

du

Parameter Description
-a Gives also file information not only folders
-c Gives also the total
-h Gives legible information (K, M, G...) instead of disk sectores
-s Total only

Examples:

du -shc info2bach*
du -sh /*
du -sch .[!.]* * |sort -h  # Show folders & files size at current folder

List large files

du -sh ./* | grep -E '^[0-9]{0,9}\.?[0-9]{1,3}G'