1

Somehow my harddrive is full and I can't find the source, so is there a way to get a list of all folders on a harddrive with the amount of used space? I could do it manually and check the properties of each folder, but this would be too much work.

I use Ubuntu 14.04

1
  • 1
    Be careful removing stuff!
    – Tim
    Jul 30, 2014 at 20:08

3 Answers 3

2

So you want to search the dash for either baobab or Disk Usage Analyser. This is already installed.

You can either chose doughnut or box graph, click the buttons in the bottom right to switch.

Doughnut:

enter image description here

Grid:

enter image description here

Hover over to view the size... (3GB here)

enter image description here

... and click on a folder to see what makes that up:

enter image description here enter image description here

2
  • Looking at your screenshots, I wonder if they were full-desktop screenshots later cropped (as opposed to per-window screenshots taken using Alt+PrtScn)?
    – muru
    Jul 30, 2014 at 20:02
  • 1
    askubuntu.com/questions/503889/… Well noticed! Very annoying. Some are full screen cropped (number 3, to show the hover box) but the others are Area screenshots...
    – Tim
    Jul 30, 2014 at 20:41
2

Try to use the Disk Usage Analyser app (installed in Ubuntu by default).

1
  • How can I open this?
    – Tim
    Jul 30, 2014 at 19:44
1

You can also use the command line if you would rather.

ls -h -l /path/to/folder

or

ls -sh -S /path/to/folder

to show you it ordered by size.

You can choose which folder in your file system to view, and view it in many different ways using this tool. /home is often a big one. There is more info available in the manual:

man ls

That command will show you all the different options. Cheers!

3
  • 1
    Cool - how can I sort the output?
    – Tim
    Jul 30, 2014 at 19:57
  • 1
    @Tim that would be ls -sh -S (the -S flag sorts by size).
    – muru
    Jul 30, 2014 at 20:00
  • Note that this won't show the size of directories (as most people understand it) - it'll show the size used by the directory metadata (the representation of the directory on the filesystem internals). To calculate the (usual) size, you'd use du -hs Jul 31, 2014 at 8:15

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.