{"id":8813,"date":"2023-01-11T17:44:32","date_gmt":"2023-01-11T20:44:32","guid":{"rendered":"https:\/\/swiv.com.br\/?p=8813"},"modified":"2026-05-27T20:02:29","modified_gmt":"2026-05-27T19:02:29","slug":"how-to-find-and-remove-old-files-on-linux-solaris","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2023\/01\/11\/how-to-find-and-remove-old-files-on-linux-solaris\/","title":{"rendered":"How to find and remove old files on Linux\/Solaris"},"content":{"rendered":"\n<p>H\u00e1 casos onde precisamos limpar as \u00e1reas de bin\u00e1rio do oracle, seja por pol\u00edticas de expurgo n\u00e3o implementadas ou derivados. Para isso, podemos utilizar o comando de exemplo abaixo, que remove todos os arquivo com extens\u00e3o .trc que s\u00e3o mais antigos que 14 dias:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel8 trace]$ pwd\n\/oracle\/18.0.0\/base\/diag\/rdbms\/rmandb\/RMANDB\/trace\n&#x5B;oracle@oel8 trace]$ find $ORACLE_BASE\/diag\/rdbms\/rmandb\/RMANDB\/trace\/*.trc -type f -mtime +14 -exec rm -f {} \\;\n&#x5B;oracle@oel8 trace]$\n<\/pre><\/div>\n\n\n<p>O mesmo resultado pode ser alcan\u00e7ado com o comando abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel8 trace]$ rm $(find $ORACLE_BASE\/diag\/rdbms\/rmandb\/RMANDB\/trace\/*.trm -mtime +14)\n&#x5B;oracle@oel8 trace]$\n<\/pre><\/div>\n\n\n<p>Mas se n\u00e3o precisarmos fazer um filtro temporal, podemos usar os seguintes exemplos (que removem arquivos com extens\u00e3o .aud, .trc, .trm e prefixo log_):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel8 trace]$ find . -name &#039;*.aud&#039; | xargs -i rm -rf &#039;{}&#039;;\n&#x5B;oracle@oel8 trace]$ find . -name &#039;*.trc&#039; | xargs -i rm -rf &#039;{}&#039;;\n&#x5B;oracle@oel8 trace]$ find . -name &#039;*.trm&#039; | xargs -i rm -rf &#039;{}&#039;;\n&#x5B;oracle@oel8 trace]$ find . -name &#039;log_*&#039; | xargs -i rm -rf &#039;{}&#039;;\n&#x5B;oracle@oel8 trace]$\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>H\u00e1 casos onde precisamos limpar as \u00e1reas de bin\u00e1rio do oracle, seja por pol\u00edticas de expurgo n\u00e3o implementadas ou derivados. Para isso, podemos utilizar o comando de exemplo abaixo, que remove todos os arquivo com extens\u00e3o .trc que s\u00e3o mais antigos que 14 dias: O mesmo resultado pode ser alcan\u00e7ado com o comando abaixo: Mas [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-8813","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/8813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=8813"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/8813\/revisions"}],"predecessor-version":[{"id":9022,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/8813\/revisions\/9022"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=8813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=8813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=8813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}