Originally published at: Ncdu Command in Linux: Disk Usage Analysis with Examples
This article is a follow-up to the previous 90 Linux Commands frequently used by Linux Sysadmins post. As time allows, I will continue to publish articles on each of these 90 commands, geared toward Linux sysadmins and Linux power users. Efficient disk space management is a key aspect of Linux system administration. The ncdu (NCurses Disk…
ncdu
is a great tool but it sadly lacks the feature to compare reports, which for example is very useful for image size comparison if you run your own image pipeline. If you need this feature then you can use gdu + gdu-diff.
Welcome to the Linux community @misc Thanks for contributing this useful alternative! I’ve not heard of gdu, but will be checking it out.
Hiya. That looks handy. I didn’t notice mention of how to navigate folder though. Would it just be the usual ENTER & Backspace keys?
This is great. Imma try out the GDU for sure.
I’ve been using Ncdu for such a long time but that GDU looks promising.
The NCDU command is almost like life to any Linux user. It is practically impossible to not want to know the files that are hogging up space on your Linux PC. That’s where NCDU comes to play. It can even be used to search for specific kinds of files in a particular directory with a typical command like this
ncdu --exclude ‘*.jpg’.
Adding a file extension to a command like that would exclude the file extension added from the directory search results, showing you only files without that extension that you want to see.
This is a great post. You can also use the df to list the file system and then use a easy iteration to list the file system. just coded this : for i in $(df | cut -f 1 -d " "); do echo du -sh $i; done.
I put all this together for a new ruby gem that i am pushing that will invoke some more functionalities.
Alles Gut,
Gaurav