Last Updated on 2024-10-12 by Clay
ncdu
is a disk usage analyzer tool based on NCurses, mainly used to view and manage disk space. It provides a terminal interface to browse the directory structure, allowing users to quickly explore directories and see the size of each file or folder. This helps users identify directories or files that are taking up a large amount of space.
Download and Install
In most Linux distributions, ncdu
can be installed using the built-in package manager:
Ubuntu / Debian
sudo apt install ncdu
CentOs / RHEL / Fedora
sudo yum install ncdu
Arch Linux
sudo pacman -S ncdu
Usage
Check Disk Usage of the Current Directory
ncdu
Check a Specific Directory
/path/to/directory
should be replaced with the path you want to check:
ncdu /path/to/directory
Exclude Certain File Types During Analysis
ncdu --exclude '*.log' /path/to/directory
References
- https://dev.yorhel.nl/ncdu
- https://www.tecmint.com/ncdu-a-ncurses-based-disk-usage-analyzer-and-tracker/