{"id":25,"date":"2012-05-24T10:17:10","date_gmt":"2012-05-24T10:17:10","guid":{"rendered":"http:\/\/www.buildingcubes.com\/?p=25"},"modified":"2015-09-30T20:54:54","modified_gmt":"2015-09-30T20:54:54","slug":"directory-and-sub-directory-sizes-and-disk-usage","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2012\/05\/24\/directory-and-sub-directory-sizes-and-disk-usage\/","title":{"rendered":"Directory and sub directory sizes and disk usage"},"content":{"rendered":"<p>Although this belongs to the Linux Command Cheat Sheet, this post is here to list all the Directory \/ Sub Directory and Disk drive usage<\/p>\n<p>To begin with, if it is disk space you are looking for information about, the following command should display the useful disk usage information<\/p>\n<p>df -h<\/p>\n<p>If you want to know the size of all sub directories in a directory<\/p>\n<p>Move to the directory containing the sub directories (if root, can take a long time)<\/p>\n<p>du -sh *<\/p>\n<p>Now, if you want to know all the directories above a certain size, in this case that measure in GBs, here is how you do it<\/p>\n<pre><code>du -h &lt;dir&gt; | grep '[0-9\\.]\\+G'<\/code><\/pre>\n<p>If the above lists directories not within the gigbytes domain, you can use the following instead<\/p>\n<pre><code>du -h &lt;dir&gt; | grep '^\\s*[0-9\\.]\\+G'<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Although this belongs to the Linux Command Cheat Sheet, this post is here to list all the Directory \/ Sub Directory and Disk drive usage To begin with, if it is disk space you are looking for information about, the following command should display the useful disk usage information df -h If you want to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":3,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":654,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions\/654"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}