Skip to main content

The du utility displays the file system block usage for each file argument and for each directory in the file hierarchy rooted in each directory argument. If no file is specified, the block usage of the hierarchy rooted in the current directory is displayed.

##
# Show all folder sizes for the current directory recursively, with their sizes:
#
# NOTE: If you run this from a high-level directory, it can take a while
# to complete.
##
du -h

##
# Show a disk use summary for the current directory:
#
# NOTE: Again, this can take a little while if you're running it in a
# high-level directory.
##
du -sh

##
# Here's an advanced find command you can run to find files over
# 10 MB (no variables in this one, just copy and paste):
##
find /home/somefolder/ -noleaf -type f -size +10000k 2>/dev/null -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' |sort -n