I am trying to get the size of a directory in Linux but it has a lot of subdirectories and seems to take forever to go through all of these files and directories before giving me an answer to what size it is. I've searched the help and manual entry and online, but can't find anything. Does it really have to output every directory as it is scanning? Is there a way to speed up this process? Usually with other commands you can just use the "-q" quiet mode switch.
Use the option -s
(summarize):
du -sh folder
(-h
is used to make the output human readable, meaning converting the number of bytes into KB,MB,GB .. )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With