ncdu (NCurses Disk Usage) is a command line version of the most popular “du command“. It is based on ncurses and provides a fastest way to analyse and track what files and directories are using your disk space in Linux. It provides an excellent ncurses based interface to display the information in more intuitive way like columns for how much disk space used in megabytes, gigabytes and graphical bar usage, file/directory names, file deletion, refresh, etc. ncdu aims to be simple, fast and easy to use program and runs on any minimal Linux/Unix based system with ncurses installed.
Install NCDU Tool
This article explains you through the process of installing and using NCDU program on a Linux system.
Installing ncdu (NCurses Disk Usage)
The “ncdu” package is not available under RHEL, CentOS, Fedora, Scientific Linux distributions, you must have epel repository enabled on your system to install it using yum command.
# yum install ncdu
The βncduβ utility is available on Ubuntu, Linux Mint and Debian from the package manager system, use the following apt-get command to install it.
$ sudo apt-get install ncdu
How Do I Use ncdu
Simply, run the “ncdu” command from the terminal. Once you run, it will start scanning for number of files and directories and disk usage of current working directory.
# ncdu
Scanning
NCDU Scanning
Tree View With Sizes
Once, scanning completes, it will present the tree structure of files and folders along with their disk usage in human readable format with graphical bar presentation.
NCDU Disk Usage Tree View
Directory Information
Press “i” to see the selected directory information like full path, disk usage, apparent size. Again, hit “i” to hide the window.
NCDU Directory Information
Delete Confirmation
Press “-d” to delete selected file or directory, before deleting it will prompt you for confirmation. Press “Yes” or “No“.
NCDU Delete Confirmation
ncdup Help Window
Press “Shift+?” to see help window with ncdu available options. You can use arrow keys to move up and down for more options.
NCDU Help Screen
Use “q” to quit interface. Here are list of available options for ncdu, you can check them.
ββββncdu helpβββββββββββββββββ1:Keysβββ2:Formatβββ3:Aboutββββββ β β β up, k Move cursor up β β down, j Move cursor down β β right/enter Open selected directory β β left, <, h Open parent directory β β n Sort by name (ascending/descending) β β s Sort by size (ascending/descending) β β d Delete selected file or directory β β t Toggle dirs before files when sorting β β g Show percentage and/or graph β β a Toggle between apparent size and disk usage β β e Show/hide hidden or excluded files β β i Show information about selected item β β r Recalculate the current directory β β q Quit ncdu β β β β Press q to continue β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Source: tecmint.com
Informative article, just what I was looking for.