{"id":46,"date":"2016-01-19T10:02:29","date_gmt":"2016-01-19T09:02:29","guid":{"rendered":"http:\/\/slackware.wp.w3.pt\/?p=46"},"modified":"2016-01-19T10:02:29","modified_gmt":"2016-01-19T09:02:29","slug":"o-maior-ficheiro-do-disco","status":"publish","type":"post","link":"http:\/\/slackware.pt\/?p=46","title":{"rendered":"O maior ficheiro do disco"},"content":{"rendered":"<p>Eis dois comandos de Linux em consola para descobrir quais os dez maiores ficheiros e as dez maiores diretorias. (sacados do site <a href=\"http:\/\/superuser.com\/questions\/9847\/linux-utility-for-finding-the-largest-files-directories\">superuser<\/a>)<\/p>\n<pre>\r\n# To find the largest 10 files (linux\/bash):\r\nfind . -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}\r\n\r\n# To find the largest 10 directories:\r\nfind . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}\r\n\r\n# Only difference is -type {d:f}\r\n<\/pre>\n<p>A minha inten\u00e7\u00e3o \u00e9 aprender um pouco mais sobre comandos do <strong>bash<\/strong> e depois explicar melhor estas instru\u00e7\u00f5es; mas, por agora, ficam aqui as instru\u00e7\u00f5es, pela utilidade imediata.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Eis dois comandos de Linux em consola para descobrir quais os dez maiores ficheiros e as dez maiores diretorias. (sacados do site superuser) # To find the largest 10 files (linux\/bash): find . -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {} &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/slackware.pt\/?p=46\" class=\"more-link\">Continuar a ler <span class=\"screen-reader-text\">&#8220;O maior ficheiro do disco&#8221;<\/span><\/a><\/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":[],"_links":{"self":[{"href":"http:\/\/slackware.pt\/index.php?rest_route=\/wp\/v2\/posts\/46"}],"collection":[{"href":"http:\/\/slackware.pt\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/slackware.pt\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/slackware.pt\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/slackware.pt\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=46"}],"version-history":[{"count":1,"href":"http:\/\/slackware.pt\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":47,"href":"http:\/\/slackware.pt\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions\/47"}],"wp:attachment":[{"href":"http:\/\/slackware.pt\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/slackware.pt\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/slackware.pt\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}