This is my old home .. find me now at andyj.github.io

List a folder size from Terminal
Posted:

There are a few apps out there to find the size of a folder but don't forget a lot of these are simply GUIs for terminal scripts. With that in mind I went looking on the best way to get the size of a folder from a script in Terminal, and it turns out DU (Disk Usage) is what you need. Below outputs the most basic information you need for a folder size:

du -h -c -s ~/Downloads/ -h human readable
-c print the grand total
-s summarise

Of course there is a lot more to it, just type man DU at your terminal to find out more.

comments powered by Disqus
© AndyJarrett 2013 | RSS Feed