Linux shell – Disk space commands

Find all files 100Mb and great in root

find / -xdev -type f -size +100M

Show current directory disk space usage, this filesystem only, and only at one level (but counts all files in the subfolders)

du -hx --max-depth=1

As above, but sort largest folders/files to the bottom of the list

du -hx --max-depth=1 | sort -h

Leave a Reply

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