Ncdu-ncurses library-based disk usage Analyzer
Ncdu (NCurses Disk Usage) is an interface based on the du command of the Ncurses library. It provides a quick and easy-to-use interface through the well-known du command. It displays the percentage of disk usage and allows you to navigate between directories using the ncurses library.
Install
Ncdu has been transplanted to most linux distributions and can be installed from the official repository.
Arch/Manajaro and its derivative editions:
- Sudo pacman-S ncdu
Ubuntu/Debian/Linux Minut and its derivative versions:
- Sudo apt-get install ncdu
Fedora and its derivative editions:
- Sudo yum install ncdu
You can find other releases here.
Use ncdu
Keyboard operation:
- Up, k-move the cursor up
- Down, j-move the cursor down
- Right/enter-open the selected directory
- Left, <, h-open parent directory
- N-sort by file name (ascending/descending)
- S-sort by file size (ascending/descending)
- C-sort by number of projects (ascending/descending)
- D-delete the selected file or directory
- T-place the directory in front of the file during sorting
- G-display percentage graphically
To use ncdu, open the terminal and run
- Ncdu
Start scanning the directory.
After scanning, you can easily see the file/directory size.
Confirm to delete the file:
Here, read the ncdu command manual or run:
- Man ncdu
Honor: Two readers, BasketCase And Sama Vim, recommended this Ncdu tool after reading "Linux Tutorial: how to view the directory size in command line.
Enjoy!
Via: http://www.unixmen.com/ncdu-ncurses-disk-usage-analyzer/
Translator: hunanchenxingyu Proofreader: wxy
This article was originally translated by LCTT and launched with the Linux honor in China
This article permanently updates the link address: