File Sizes in Ubuntu

So you may find that you would like to sort out some file size information.  Of course you can access any directory (or file) and look at its properties using the file browser (Nautilus), but you may want to dig deeper or you may want to get a broader picture.

First, from the command line you can just list out the directory contents thus:

ls -alh /path/to/directory

This will give you file sizes and the number of items in each directory in human-readable numbers (MB or GB as it were).  You might also like to see how large directories are, and you can do that like so:

du -hcs /path/to/directory

If you are not so interested in the terminal, there are a couple of good GUI applications for sizing matters.  There is Disk Usage Analyzer (baobab from the terminal) and Graphical Disk Map (gdmap from the terminal).  Both are small and both are in the repositories and can be installed easily:

sudo apt-get install gdmap

sudo apt-get install baobab

Finally, to get an overview of all disk usage, I like the terminal command df:

df -h

This will list your partitions and their usage.  These ought to cover just about any size question you might care to have answered.

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *