See used folder space in Linux Terminal (Ubuntu, Mint, Debian)

Working more and more in the terminal, once and so often I find a problem where there is no simple terminal solution. One off these problems was seeing the how much space every folder takes on my servers. After a little search I found a solution called NCDU.

The default file manager for Ubuntu doesn’t give users the possibility to see how much space a folder or subfolder takes up. You may use third-party software to see which folders that take up most space in your hard drive, or simply use the terminal to scan for big size folders to see where hard disk space has gone.
To do this, we need first to install the ncdu package (ncurses disk usage viewer & analyzer) with this command:

To scan the root folder, run now this command:

The scan process may take several minutes to finish depending on the size of your hard drive. The returned output will be sorted by size.

To scan the home folder, run this command:

To scan a specific folder, use this command:

That’s it!

Geef een antwoord

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *