I am able to get a size of a directory at the end of the du -h directoryname
. But is there a way to get the size without it listing the files/directories within?
I'm currently doing it like this:
du -h directoryname | tail -n1
How to keep an index of directory sizes? Is there an Ubuntu application/software for that?
The
-s
option fordu
will give you an output which is just the summary, so swap your command to:You can use:
From
man du
:If you want a GUI application to do that, you can use Disk Usage Analyzer (or
baobab
), to check:Or use the 'Properties' feature (in most file managers):
The last one I think caches a bit unless a noticeable change occurs (in Nemo anyway).