NCDU – Find what’s using all your disk space on linux based system
NCDU is a text-based user interface, it allows you to visually see how and where disk space is being used via an easy-to-use interface. Simple run the command in the current directory to see a directory tree of folders & files and their space usage.
I use this tool mainly for analysing why a server is running out of disk space, determine the reason why and if it’s simply expanded the disk space or is there unused files / massive logs which can be purged.
Run the required command for your linux OS version.
sudo apt install ncdu
sudo yum install ndcu
How to use
Simple navigate to a directory you want to check and run the command:
If you want to scan the whole system go to the root directory:
You can also specify a directory if you don’t want to change directory:
Windows Server / PC
This is provided as it and may require changes to work for your needs.