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?
-Sswitch is equivalent to-d 0, (and shorter); for details seeinfo du | sed -n "/‘-\(S’$\|d \)/,/^$/p". – agc Jun 14 '19 at 10:23