Skip to main content

What's Hogging the Disk Space?

To "find" files greater than 1024k and "sort" by largest size first:

find / -mount -size +1024k -type f -exec ls -la {} \;|sort -rnb -k 5|more

To find directories that are consuming large amount of space (with files) and sort by largest first:

du -x / |sort -rnb |more

To see how much space is being used in a specific directory:

du -sh /var/logs

After all the cleanup, I didn’t free the diskspace, and used this command to identify processes holding open deleted files:

sudo /usr/sbin/lsof | grep deleted

disk volume, linux