{"id":660,"date":"2012-07-10T16:58:08","date_gmt":"2012-07-10T08:58:08","guid":{"rendered":"http:\/\/rmohan.com\/?p=660"},"modified":"2012-07-11T08:26:43","modified_gmt":"2012-07-11T00:26:43","slug":"list-folders-directories-by-size-in-linux-aix-windows","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=660","title":{"rendered":"List folders \/ directories by size in Linux \/ AIX \/ Windows"},"content":{"rendered":"<div>\u00a0To list the directory sizes in kilo bytes and largest at the top<\/div>\n<p>du -sk * | sort +0nr<br \/>\ndu -sk * | sort -nr<\/p>\n<p>To list the directory sizes in Mega bytes and largest at the top<br \/>\ndu -sm * | sort +0nr<br \/>\ndu -sm * | sort -nr<\/p>\n<p>To list the directory sizes in kilo bytes and largest at the bottom.<br \/>\ndu -sk * | sort +0n<br \/>\ndu -sk * | sort -n<\/p>\n<p>To list the directory sizes in Mega bytes and largest at the bottom.<br \/>\ndu -sm * | sort +0n<br \/>\ndu -sm * | sort -n<\/p>\n<p>To list the directory sizes in human readable format (Mix of kilo, Mega and Giga bytes) and largest at the bottom<br \/>\ndu -s *|sort -n|cut -f 2-|while read a;do du -hs $a;done<\/p>\n<p>To list the size of hidden directories<\/p>\n<p>du -sk .[a-z]* | sort +0nr<\/p>\n<p>To list the size of all the files and directorires including hidden files and directories<br \/>\ndu -sk .[a-z]* * | sort +0n<\/p>\n<p>Windows explorer Folder size extension<\/p>\n<p>http:\/\/foldersize.sourceforge.net\/<\/p>\n<p>Download the package from the abouve URL and install it.<\/p>\n<ul>\n<li>\u00b7 After the installation Folder Size column is available to Explorer, but Explorer isn&#8217;t displaying it yet. Open an Explorer window in Details view.<\/li>\n<li>\u00b7 Right click on the column headers to see a list of columns you can add. Choose Folder Size.<\/li>\n<li>\u00b7 Now we can replace the existing Size column with the new Folder Size column. Right click on the column headers and uncheck the Size column. Drag the Folder Size column header to where Size used to be.<\/li>\n<li>\u00b7 Make this the default view for all folders. Go to Folder Options from the Tools menu. In the View tab, click Apply to All Folders<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p> To list the directory sizes in kilo bytes and largest at the top <\/p>\n<p>du -sk * | sort +0nr du -sk * | sort -nr<\/p>\n<p>To list the directory sizes in Mega bytes and largest at the top du -sm * | sort +0nr du -sm * | sort -nr<\/p>\n<p>To list the directory [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/660"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=660"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/660\/revisions"}],"predecessor-version":[{"id":673,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/660\/revisions\/673"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}