ncdu: use du command more visually with ncurses?

ncdu

There are various ways and tools to analyze and track disk usage, such as the famous du command. However, this alternative, called ncdu, which I show you today can be somewhat more intuitive and visual, since it uses the famous NCureses library to provide this tool with a text-based interface.

ncdu comes from NCurses Disk Usage, and is based on the online tool from du commands. In addition, it is very fast and will show you instantly the use that your files and directories are making of a storage space in Linux. The information will be displayed in columns, with fields such as megabytes, gigabytes, bar graphs of space, etc.

The ncdu package is available in the distros repositories such as Debian, Ubuntu, Linux Mint and derivatives. However, you won't find it in other distributions like RHEL, CentOS, Fedora, etc. In that case you will have to enable the repo to be able to install it with your preferred package management tool.

Once ncdu is installed, use it from the terminal It is very simple. You just have to run it:

ncdu

And that will start track files and directories that are within the current working directory. Once the content has been scanned, it will present the tree structure of the files and directories, as well as their disk usage in a human-readable format and with a bar graph.

Also, as soon as the scanning process is over, you can also use a series of interactive features. For example, if you press i you will see information for the directory you have selected. You can move with the arrows. You can also delete the selected file or directory with -d and then confirm with Yes or No. To see help for ncdu you can press Shift +? and the information window will appear.

For, exit the interface you can use q.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

A comment, leave yours

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   luix said

    Interesting, I used to use MC to view it comfortably ..