This has probably been answered elsewhere but can't seem to find it and apologies for the duplicate/basic question.
I want to simply be able to display the file size of folders in a directory.
Running du -h
lists all the folders but it also includes files in the directory. I'd prefer it to display similar to the below...
Documents Size mb
Temp Size mb
Pictures Size mb
Videos Size mb
Total size
Bonus if i could get the total at the end included. Is the possible through a simple command?
Thanks
Try this:
The s option there means "summarize", to display only a total for each argument, and the * means you will get that for each directory (and file) where you stand.