NCurses Disk Usage Monitor

NCDU –¬†NCurses Disk Usage Monitor

A great way to see current disk usage, with an easy to use navigation feature. Some good options such as changing the working directory to the selected one,
or being able to remove files/directorys from the interface, make this a handy all round tool to have.

Allows you to see at a glance which files and folders are taking up space and how much they are using in relation to other files/folders.

To install you need to have wget and tar installed first. First sudo upto root then:

[root@server ~]# yum -y install wget tar

 

Run this in the /root directory

[root@server ~]# wget –no-check-certificate https://dev.yorhel.nl/download/ncdu-linux-i486-1.13.tar.gz</span>
[root@server ~]# tar -zxvf ncdu-linux-i486-1.13.tar.gz</span>

 

This adds the following to the directory

[root@server ~]# ll
total 2
-rwxr-xr-x. 1 root root 460216 Jan 29 2018 ncdu
-rw-r–r–. 1 root root 195977 Jan 29 2018 ncdu-linux-i486-1.13.tar.gz

 

Then to run:

[root@server ~]# ./ncdu

 

Options and controls to use within the application:

arrow keys – move up and down the directory list
enter – enter the selected directory (if possible)
backspace – go back to the previous directory page (if possible)

q – quit ncdu (can also use ctl + c)

n – sort by name
Sorts all current file name results by name, press once for A-Z, press again for Z-A.

s – sort by size
By default this is what you see when you run the application. Again, the results can be reversed. The actual file sizes are displayed on the left of the screen.

c – show items
This adds a new column which gives you a count of items that are contained within the named folder

d- delete file/directory
Alows removal of files and directories withlin ncdu

e – show/hide hidden or excluded files
Enabled by default, you can use this option to hide or show hidden files and folders in the file list

i – show info on selected item
The opens up another small window that givesyou the name, path and file type. It gives you the disk usage both in B and human readable form.

g- show % and/or graph
When you run mcdu it gives you a horizontal graph visualising the disk usage and allows for at-a-glance viewing of file size and easy comparisons. Pressing ‘g’ changes the view to give a % readout to 1 decimal place instead of the graph. Pressing it again gives both the % and the graph.

b – change working directory to the one you have selected
If you use ncdu to move arround the file structure on your server, you can jump to the highlighted directory by using this option