{"id":2796,"date":"2015-10-30T23:19:24","date_gmt":"2015-10-30T23:19:24","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=2796"},"modified":"2015-10-30T23:19:24","modified_gmt":"2015-10-30T23:19:24","slug":"remove-old-logs-from-linux","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2015\/10\/30\/remove-old-logs-from-linux\/","title":{"rendered":"Remove Old Logs from Linux"},"content":{"rendered":"<p>Example<\/p>\n<p>Remove logs older than 5 days<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# find \/var\/log* -mtime +5 -exec rm {} \\;\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nrm: cannot remove `\/var\/log\/tomcat6&#039;: Is a directory\nrm: cannot remove `\/var\/log\/proftpd&#039;: Is a directory\nrm: cannot remove `\/var\/log\/clamav&#039;: Is a directory\nrm: cannot remove `\/var\/log\/prelink&#039;: Is a directory\nrm: cannot remove `\/var\/log\/sssd&#039;: Is a directory\nrm: cannot remove `\/var\/log\/roundcubemail&#039;: Is a directory\nrm: cannot remove `\/var\/log\/samba&#039;: Is a directory\nrm: cannot remove `\/var\/log\/samba\/old&#039;: Is a directory\nrm: cannot remove `\/var\/log\/ConsoleKit&#039;: Is a directory\nrm: cannot remove `\/var\/log\/ntpstats&#039;: Is a directory\nrm: cannot remove `\/var\/log\/mailman&#039;: Is a directory\nrm: cannot remove `\/var\/log\/cups&#039;: Is a directory\nrm: cannot remove `\/var\/log\/audit&#039;: Is a directory\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Example Remove logs older than 5 days # find \/var\/log* -mtime +5 -exec rm {} \\; rm: cannot remove `\/var\/log\/tomcat6&#039;: Is a directory rm: cannot remove `\/var\/log\/proftpd&#039;: Is a directory rm: cannot remove `\/var\/log\/clamav&#039;: Is a directory rm: cannot remove `\/var\/log\/prelink&#039;: Is a directory rm: cannot remove `\/var\/log\/sssd&#039;: Is a directory rm: cannot remove `\/var\/log\/roundcubemail&#039;: &#8230; <a title=\"Remove Old Logs from Linux\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2015\/10\/30\/remove-old-logs-from-linux\/\" aria-label=\"Read more about Remove Old Logs from Linux\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[139],"class_list":["post-2796","post","type-post","status-publish","format-standard","hentry","category-administration","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=2796"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/2796\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=2796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=2796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=2796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}