Directory Statistics Linux Terminal

Last modified: 
Saturday, 14. October 2017 - 1:59

Took me a while to find the perfect command for finding the biggest directory in the linux terminal. I was looking for something similar to the graphical tools like QDirStat and K4DirStat (Directory Statistics). In windows you can achieve this with windirstat.

Use find:

find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {} (https://superuser.com/questions/9847/linux-utility-for-finding-the-large...).

Or install ncdu.

Tags: