find biggest (largest) files and folders Linux

To find the largest 10 files on Linux systems:


find . -type f -print0 | xargs -0 du -s | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}

To find the largest 10 directories:

find . -type d -print0 | xargs -0 du -s | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}

Leave a Reply

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