How To Find Largest And Smallest Directories And Files In Linux

Find Largest And Smallest Directories And Files In Linux

3 Responses

  1. Bogdan says:

    Thanks. Learning something new every day. I always bookmark these pages.
    I use ‘du -a -h –max-depth=1 | sort -hr’ to see the largest directories.

  2. Jeff Yang says:

    sudo /var du -ah | sort -n -r | head -n 10

    should be

    sudo du -ah /var | sort -n -r | head -n 10

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.