Simple du command lists all folders with their corresponding size of disk plus to start with.
DU – Disk Usage
It takes given path as an argument
Aggregate total of sizes of all files and folder underneath
Aggregate command works well with h option to display size in human readable format. For example, 2M, 1.3G etc.
To sort by file or folder size
du | sort -n -r | less
To find the largest files or folders on a file system
du -a | sort -n -r | head -n 10
List all files greater than a threshold, sorted files by size
du -h --threshold=10M | sort -h
Hello Friends, I’m Arvind Kumar, founder of Inimist Technologies, Inimist Academy, The Fundabook and many more. I am a Full Stack Web Developer and Programmer by heart, and a Hindi/English blogger by chance. I build Web and Mobile Application around React, VueJS, NodeJS and PHP frameworks.
Have a project in mind? Get in touch