Posted By

zingo on 07/22/08


Tagged

size cli statistic directories


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Juego


Sort Directories by Size


 / Published in: Bash
 

URL: http://spiralbound.net/2006/11/27/using-sort-to-list-directories-by-size

  1. # Display the size of all directories and sort them from largest to smallest.
  2. du -sk * | sort +0nr
  3.  
  4. # Sort them from smallest to largest.
  5. du -sk * | sort +0n
  6.  
  7. # Sort and show the size of hidden directories.
  8. du -sk .[a-z]* | sort +0nr

Report this snippet  

You need to login to post a comment.