{"id":825,"date":"2015-02-25T08:32:51","date_gmt":"2015-02-25T08:32:51","guid":{"rendered":"http:\/\/shivdev.com\/blog\/?p=825"},"modified":"2017-05-26T09:13:36","modified_gmt":"2017-05-26T09:13:36","slug":"find-the-largest-files-or-directories-in-linux","status":"publish","type":"post","link":"http:\/\/shivdev.com\/blog\/2015\/02\/25\/find-the-largest-files-or-directories-in-linux\/","title":{"rendered":"Find the largest files or directories in Linux"},"content":{"rendered":"<p>Running out of space? To find the biggest files or folders in your Linux environment in descending order, switch to the root folder and then run the <strong>du<\/strong> command.<\/p>\n<blockquote><p>\ncd \/<br \/>\ndu -Sh | sort -rh | head -n 20\n<\/p><\/blockquote>\n<p>Mac equivalent is something like<\/p>\n<blockquote><p>find . -type f -print0 | xargs -0 ls -l | sort -k5,5rn<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Running out of space? To find the biggest files or folders in your Linux environment in descending order, switch to the root folder and then run the du command. cd \/ du -Sh | sort -rh | head -n 20 Mac equivalent is something like find . -type f -print0 | xargs -0 ls -l [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"_links":{"self":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/825"}],"collection":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/comments?post=825"}],"version-history":[{"count":3,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/825\/revisions"}],"predecessor-version":[{"id":918,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/825\/revisions\/918"}],"wp:attachment":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/media?parent=825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/categories?post=825"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/tags?post=825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}