8

I am pretty new with Ubuntu, so take it easy on me.

enter image description here

This is the "problem" (feature?) that I'm experiencing. It sorts by amount of folders and files, not by the actual file size.

I want to know much much of disk space certain folders use, not how many sub-folders/files it contains. Any way to do this? For simplicity's sake, is there any way to do this using the Unity GUI ? Or is terminal the only way?

9

At least there is a GUI tool called baobab which you pretty sure have to install. I am sure there are more GUI tools out there. Just use your favorite search engine to find others.

On the command line, there is ncdu which does the job you want. Otherwise you could use plain command line tools like follows.

du -h --max-depth=1 <folder-to-check> | sort -h
du -h --max-depth=1 /etc/ | sort -h

I think all of them will output files and directories.

1
  • It seems like it was already installed on my version. Thank you.
    – Nephilim
    Jan 19 '17 at 11:05
5

As mentioned by Thomas in his answer, you should use Disk Usage Analyzer app, aka Baobab. The default file manager, Nautilus, doesn't have a setting for displaying directory usage in bytes.

Command-line alternative to that would be ncdu , which you can get with sudo apt-get install ncdu enter image description here

1
2

Great GUI tool called Baobab (aka Disk Usage Analyzer). I am especially in love with the interactive radial maps, which do a wonderful job at showing percent of usage per folder and sub-folder trees. Takes only seconds to drill down and see where those space hogs are.

To install

sudo apt-get install baobab 

To run

gksu baobab

If running on an encrypted drive, scan that particular one by going to the main page and then pressing the three lines in the upper right corner and choosing the sub-file (like home if it is encrypted).

3
  • 1
    It would be great if you could share more about why you prefer Baobab to other options that are out there!
    – Hee Jin
    Jun 28 '18 at 15:04
  • Great suggestion Emily. I'll add some to my answer.
    – izk9
    Jun 28 '18 at 15:11
  • Nice additions to your answer—thank you for sharing, it is incredibly helpful!
    – Hee Jin
    Jun 30 '18 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.