{"id":415,"date":"2015-04-27T01:27:41","date_gmt":"2015-04-26T16:27:41","guid":{"rendered":"http:\/\/tajibook.com\/?p=415"},"modified":"2015-05-12T22:08:59","modified_gmt":"2015-05-12T13:08:59","slug":"remove-old-files","status":"publish","type":"post","link":"https:\/\/blog.codebase.co.jp\/en\/remove-old-files","title":{"rendered":"Remove Old Files"},"content":{"rendered":"<p>You can use &#8220;find&#8221; command with &#8220;-exec&#8221; parameter to remove\u00a0old files in UNIX system.<\/p>\n<pre class=\"lang:sh decode:true\">$ find &lt;Directory&gt; -maxdepth 1 -mtime +&lt;Days&gt; -exec rm -f {} \\;<\/pre>\n<p>Please see the following for the meanings of each parameter.<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;Directory&gt;<\/td>\n<td>Specify a directory where the target files are located.<\/td>\n<\/tr>\n<tr>\n<td>-maxdepth 1<\/td>\n<td>Search files only in the given directory by setting &#8220;1&#8221;. Ignore the child directories.<\/td>\n<\/tr>\n<tr>\n<td>-mtime +&lt;Days&gt;<\/td>\n<td>\n<p>Search files modified more than &lt;Days&gt; days ago.<\/p>\n<p>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td>-exec rm -f {} \\;<\/td>\n<td>Execute &#8220;rm&#8221; command on the found files.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can use &#8220;find&#8221; command with &#8220;-exec&#8221; parameter to remove\u00a0old files in UNIX system.  (&hellip;) <a href=\"https:\/\/blog.codebase.co.jp\/en\/remove-old-files\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"412","footnotes":""},"categories":[34],"tags":[],"class_list":["post-415","post","type-post","status-publish","format-standard","hentry","category-unix","en-US"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/posts\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":2,"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"predecessor-version":[{"id":417,"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/posts\/415\/revisions\/417"}],"wp:attachment":[{"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.codebase.co.jp\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}