{"id":563,"date":"2017-03-23T18:09:39","date_gmt":"2017-03-23T12:39:39","guid":{"rendered":"http:\/\/www.cyberaka.com\/?p=563"},"modified":"2017-03-28T01:39:49","modified_gmt":"2017-03-27T20:09:49","slug":"linux-disk-usage","status":"publish","type":"post","link":"https:\/\/www.cyberaka.com\/?p=563","title":{"rendered":"Linux Disk Usage"},"content":{"rendered":"<p>I found a <a href=\"http:\/\/www.tecmint.com\/check-linux-disk-usage-of-files-and-directories\/\">good link<\/a> which lists good usages of the Linux command &#8220;du&#8221;.<\/p>\n<p class=\"p1\">This command allows me to see the usage in a ascending sort which is really helpful.<\/p>\n<p>Tested on Linux.<br \/>\n<code>du -h \/ | sort -h<\/code><\/p>\n<p>Tested on Mac OS.<br \/>\n<code>du -hs * | gsort -h<\/code><\/p>\n<p>In case you don&#8217;t have gsort install coreutils.<br \/>\n<code>brew install coreutils<\/code><\/p>\n<p class=\"p1\">This variation allows me to see any line which has the text &#8220;G&#8221; in it which basically allows me to see folders using space in GBs. Agreed it might give some folder names as well with &#8220;G&#8221; in it but I can bear with it.<\/p>\n<p>Tested on Linux.<br \/>\n<code>du -h \/the\/path | sort -h | grep \"G\"<\/code><\/p>\n<p>Tested on Mac OS.<br \/>\n<code>du -h \/the\/path | gsort -h | grep \"G\"\u00a0<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I found a good link which lists good usages of the Linux command &#8220;du&#8221;. This command allows me to see the usage in a ascending sort which is really helpful. Tested on Linux. du -h \/ | sort -h Tested on Mac OS. du -hs * | gsort -h In case you don&#8217;t have gsort [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,35,24],"tags":[],"class_list":["post-563","post","type-post","status-publish","format-standard","hentry","category-linux-os","category-mac-os","category-tips-and-tricks"],"_links":{"self":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts\/563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=563"}],"version-history":[{"count":5,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts\/563\/revisions"}],"predecessor-version":[{"id":569,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts\/563\/revisions\/569"}],"wp:attachment":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}