{"id":2391,"date":"2017-12-08T09:09:37","date_gmt":"2017-12-08T09:09:37","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2391"},"modified":"2020-01-09T10:01:58","modified_gmt":"2020-01-09T10:01:58","slug":"shell-script-to-delete-a-folder-that-is-more-then","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/shell-script-to-delete-a-folder-that-is-more-then\/","title":{"rendered":"Shell Script to delete a folder that is more then"},"content":{"rendered":"<p><strong>scmuser created the topic: Shell Script to delete a folder that is more then<\/strong><br \/>\nShell Script to delete a folder that is more then 1 week old<\/p>\n<p>Hi all,<br \/>\ni have this scritp<br \/>\nset -x<br \/>\ncd \/var\/log\/<br \/>\ndirec=&#8221;bkp_`date +%F`&#8221;<br \/>\nmkdir $direc<br \/>\ncp \/var\/log\/*.log \/tmp\/bkp.<br \/>\n&#8212;<br \/>\nHere im ok, what i need is a scritp to check if i have a folder that is more then 1 week to delete it.<br \/>\nAny help please?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>scmuser created the topic: Shell Script to delete a folder that is more then Shell Script to delete a folder that is more then 1 week old&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[454],"tags":[138],"class_list":["post-2391","post","type-post","status-publish","format-standard","hentry","category-shell-script","tag-shell"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2391"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2391\/revisions"}],"predecessor-version":[{"id":2392,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2391\/revisions\/2392"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}