ncdu – NCurses Disk Usage Analyzer

by
Share this Article: Facebook0Google+0Twitter25LinkedIn4Reddit1StumbleUpon1

Ncdu (NCurses Disk Usage)  is a ncurses-based du viewer. It provides a fast and easy-to-use interface through the well-known du command. It displays percentages of disk usage and also allow you to browse through directories via ncurses library.

ncdu about

Installation

ncdu has been ported to most Linux distros and can be installed via official repos.

Arch / Manajaro and Derivatives:

sudo pacman -S ncdu

ncdu

Ubuntu / Debian / Linux Minut and Derivatives:

sudo apt-get install ncdu

Fedora and Derivatives:

sudo yum install ncdu

Check here for other distros.

Using ncdu

Keys:

  • 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)
  • C            – Sort by items (ascending/descending)
  • d            – Delete selected file or directory
  • t             — Toggle dirs before files when sorting
  • g            – Show percentage and/or graph

To use ncdu, Open your terminal and run

ncdu

this starts scanning the directories.

ncdu scanning

When scanning is done you can easily see the file / directory sizes.

done scanning

Delete file confirm:

ncdu delete confirm

Read the ncdu manual here or run:

man ncdu

Credit: Ncdu was suggested by two of our readers BasketCase and Sama Vim in the post Linux Basics: How To Find Size of Directory Commands.

Enjoy!

For questions please refer to our Q/A forum at : http://ask.unixmen.com/


Share this Article: Facebook0Google+0Twitter25LinkedIn4Reddit1StumbleUpon0