{"id":1275,"date":"2015-03-22T07:06:25","date_gmt":"2015-03-21T19:06:25","guid":{"rendered":"http:\/\/p-s.co.nz\/wordpress\/?p=1275"},"modified":"2015-03-22T07:06:25","modified_gmt":"2015-03-21T19:06:25","slug":"listing-python-scripts-changed-most-recently","status":"publish","type":"post","link":"http:\/\/p-s.co.nz\/wordpress\/listing-python-scripts-changed-most-recently\/","title":{"rendered":"Listing Python scripts changed most recently"},"content":{"rendered":"<p><code>find \/ -name *.py -type f -mtime -60 -printf '%TY-%Tm-%Td %TT %p\\n' 2>\/dev\/null | sort -r <\/code><\/p>\n<table>\n<thead>\n<tr>\n<th>Command\/options<\/th>\n<th>Explanation<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>find<\/td>\n<td>Not as fast as locate but has many advantages. See <a href=\"http:\/\/unix.stackexchange.com\/questions\/60205\/locate-vs-find-usage-pros-and-cons-of-each-other\" target=\"_blank\">locate vs find: usage, pros and cons of each other<\/a><\/td>\n<\/tr>\n<tr>\n<td>-name *.py<\/td>\n<td>Only find python scripts<\/td>\n<\/tr>\n<tr>\n<td>-mtime -60<\/td>\n<td>-mtime is days<\/td>\n<\/tr>\n<tr>\n<td>-printf &#8216;%TY-%Tm-%Td %TT %p\\n&#8217;<\/td>\n<td>Displays output with easy-to-read dates<\/td>\n<\/tr>\n<tr>\n<td>2>\/dev\/null<\/td>\n<td>Pumps all the annoying output about lacking permissions into \/dev\/null i.e. ignores them<\/td>\n<\/tr>\n<tr>\n<td>|<\/td>\n<td>Pipes output through to be sorted<\/td>\n<\/tr>\n<tr>\n<td>sort -r<\/td>\n<td>Sort so most recent are at top<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Also see <a href=\"http:\/\/xmodulo.com\/how-to-find-recently-modified-files-on-linux.html\" target=\"_blank\"><br \/>\nHow to find recently modified files on Linux<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>find \/ -name *.py -type f -mtime -60 -printf &#8216;%TY-%Tm-%Td %TT %p\\n&#8217; 2>\/dev\/null | sort -r Command\/options Explanation find Not as fast as locate but has many advantages. See locate vs find: usage, pros and cons of each other -name &hellip; <a href=\"http:\/\/p-s.co.nz\/wordpress\/listing-python-scripts-changed-most-recently\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/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":[3],"tags":[],"class_list":["post-1275","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/1275"}],"collection":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/comments?post=1275"}],"version-history":[{"count":4,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/1275\/revisions"}],"predecessor-version":[{"id":1279,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/1275\/revisions\/1279"}],"wp:attachment":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/media?parent=1275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/categories?post=1275"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/tags?post=1275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}