MacOS, how to get folder size (physical size on disk)

apfsmacos

Ok so I have a large folder on disk see the image below

enter image description here

You can see it says the size of the folder is 8.46GB however this is mostly source code, and I think file system will be using file compression under the hood. I'd expect this folder to compress very well, so my question is this. "How can I find out how much actual physical space this folder is using?"

Thanks

Best Answer

You should go to the terminal and from the terminal cd to the folder you want to get the size of. Once there type: du -h. The last number it prints is the directory size.