{"id":366,"date":"2023-05-16T14:14:44","date_gmt":"2023-05-16T14:14:44","guid":{"rendered":"https:\/\/www.jibsheet.net\/linux\/?p=366"},"modified":"2023-05-16T14:14:56","modified_gmt":"2023-05-16T14:14:56","slug":"find-command-listing-last-modify-path-with-full-dir","status":"publish","type":"post","link":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/","title":{"rendered":"Find command &#8211; listing last modify path with full dir"},"content":{"rendered":"<p>Some examples of this command from Linux Debian and FreeBSD<\/p>\n<p>&nbsp;<\/p>\n<p>Here is how to do this with GNU Linux &#8211; %p gives full path name<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">user1@f1-google-joniowa:~$ find . -name \"weather_obs.log\"  -printf \"%p\\t%TY-%Tm-%Td\\n\"\r\n.\/test27\/weather_obs\/weather_obs.log    2023-05-16\r\n.\/test26\/weather_obs\/weather_obs.log    2022-12-08\r\n.\/test28\/weather_obs\/weather_obs.log    2023-02-28\r\n.\/test25\/weather_obs\/weather_obs.log    2022-08-18\r\n.\/python\/weather_obs\/weather_obs.log    2021-05-24\r\n.\/test24\/weather_obs\/weather_obs.log    2022-11-22\r\n<\/pre>\n<p>Here is a bsd version &#8211;\u00a0 \u00a0uses exec<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[user1@freebsd12_3 ~]$ find . -name \"weather_obs.log\"  -exec stat -f \"%N %Sm\" {} +\r\n.\/github\/weather_obs\/weather_obs.log Jan 24 10:47:34 2023\r\n.\/weather_obs.log Aug 18 21:40:02 2022\r\n.\/test25\/weather_obs\/weather_obs.log May 16 10:07:57 2023\r\n.\/test27\/weather_obs\/weather_obs.log Jan  6 10:03:16 2023\r\n.\/testbak\/weather_obs\/weather_obs.log Nov 18 14:32:31 2022\r\n.\/testdst\/weather_obs\/weather_obs.log Mar 13 13:32:43 2023\r\n.\/test30\/weather_obs\/weather_obs.log May 16 10:07:57 2023\r\n<\/pre>\n<p>This will work in Linux as well &#8211; but output is\u00a0 a bit different.<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">user1@jon-f1-google-iowa:~$ find . -name \"weather_obs.log\"  -exec stat -f \"%N %Sm\" {} +\r\nstat: cannot read file system information for '%N %Sm': No such file or directory\r\n  File: \".\/test27\/weather_obs\/weather_obs.log\"\r\n    ID: 450374cda88701e7 Namelen: 255     Type: ext2\/ext3\r\nBlock size: 4096       Fundamental block size: 4096\r\nBlocks: Total: 2522434    Free: 1441271    Available: 1307742\r\nInodes: Total: 647168     Free: 537653\r\n  File: \".\/test26\/weather_obs\/weather_obs.log\"\r\n    ID: 450374cda88701e7 Namelen: 255     Type: ext2\/ext3\r\nBlock size: 4096       Fundamental block size: 4096\r\nBlocks: Total: 2522434    Free: 1441271    Available: 1307742\r\nInodes: Total: 647168     Free: 537653\r\n  File: \".\/test28\/weather_obs\/weather_obs.log\"\r\n    ID: 450374cda88701e7 Namelen: 255     Type: ext2\/ext3\r\nBlock size: 4096       Fundamental block size: 4096\r\nBlocks: Total: 2522434    Free: 1441271    Available: 1307742\r\nInodes: Total: 647168     Free: 537653\r\n  File: \".\/test25\/weather_obs\/weather_obs.log\"\r\n    ID: 450374cda88701e7 Namelen: 255     Type: ext2\/ext3\r\nBlock size: 4096       Fundamental block size: 4096\r\nBlocks: Total: 2522434    Free: 1441271    Available: 1307742\r\nInodes: Total: 647168     Free: 537653\r\n  File: \".\/python\/weather_obs\/weather_obs.log\"\r\n    ID: 450374cda88701e7 Namelen: 255     Type: ext2\/ext3\r\nBlock size: 4096       Fundamental block size: 4096\r\nBlocks: Total: 2522434    Free: 1441271    Available: 1307742\r\nInodes: Total: 647168     Free: 537653\r\n  File: \".\/test24\/weather_obs\/weather_obs.log\"\r\n    ID: 450374cda88701e7 Namelen: 255     Type: ext2\/ext3\r\nBlock size: 4096       Fundamental block size: 4096\r\nBlocks: Total: 2522434    Free: 1441271    Available: 1307742\r\nInodes: Total: 647168     Free: 537653\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some examples of this command from Linux Debian and FreeBSD &nbsp; Here is how to do this with GNU Linux &#8211; %p gives full path name &nbsp; user1@f1-google-joniowa:~$ find . -name &#8220;weather_obs.log&#8221; -printf &#8220;%p\\t%TY-%Tm-%Td\\n&#8221; .\/test27\/weather_obs\/weather_obs.log 2023-05-16 .\/test26\/weather_obs\/weather_obs.log 2022-12-08 .\/test28\/weather_obs\/weather_obs.log 2023-02-28 .\/test25\/weather_obs\/weather_obs.log 2022-08-18 .\/python\/weather_obs\/weather_obs.log 2021-05-24 .\/test24\/weather_obs\/weather_obs.log 2022-11-22 Here is a bsd version &#8211;\u00a0 \u00a0uses exec &nbsp; [user1@freebsd12_3 ~]$ find . -name [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[22,28,5],"tags":[29],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Find command - listing last modify path with full dir - Jon Allen&#039;s Linux Stuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Find command - listing last modify path with full dir - Jon Allen&#039;s Linux Stuff\" \/>\n<meta property=\"og:description\" content=\"Some examples of this command from Linux Debian and FreeBSD &nbsp; Here is how to do this with GNU Linux &#8211; %p gives full path name &nbsp; user1@f1-google-joniowa:~$ find . -name &quot;weather_obs.log&quot; -printf &quot;%pt%TY-%Tm-%Tdn&quot; .\/test27\/weather_obs\/weather_obs.log 2023-05-16 .\/test26\/weather_obs\/weather_obs.log 2022-12-08 .\/test28\/weather_obs\/weather_obs.log 2023-02-28 .\/test25\/weather_obs\/weather_obs.log 2022-08-18 .\/python\/weather_obs\/weather_obs.log 2021-05-24 .\/test24\/weather_obs\/weather_obs.log 2022-11-22 Here is a bsd version &#8211;\u00a0 \u00a0uses exec &nbsp; [user1@freebsd12_3 ~]$ find . -name [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/\" \/>\n<meta property=\"og:site_name\" content=\"Jon Allen&#039;s Linux Stuff\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-16T14:14:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-16T14:14:56+00:00\" \/>\n<meta name=\"author\" content=\"jonallen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"jonallen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/\"},\"author\":{\"name\":\"jonallen\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993\"},\"headline\":\"Find command &#8211; listing last modify path with full dir\",\"datePublished\":\"2023-05-16T14:14:44+00:00\",\"dateModified\":\"2023-05-16T14:14:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/\"},\"wordCount\":62,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993\"},\"keywords\":[\"unix\"],\"articleSection\":[\"bash\",\"BSD\",\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/\",\"url\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/\",\"name\":\"Find command - listing last modify path with full dir - Jon Allen&#039;s Linux Stuff\",\"isPartOf\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#website\"},\"datePublished\":\"2023-05-16T14:14:44+00:00\",\"dateModified\":\"2023-05-16T14:14:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.jibsheet.net\/linux\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Find command &#8211; listing last modify path with full dir\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#website\",\"url\":\"https:\/\/www.jibsheet.net\/linux\/\",\"name\":\"Jon Allen's Linux Stuff\",\"description\":\"Howto&#039;s, Observations, and stuff\",\"publisher\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.jibsheet.net\/linux\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993\",\"name\":\"jonallen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7d7c061ce9db8f5e4710555585475882?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7d7c061ce9db8f5e4710555585475882?s=96&d=mm&r=g\",\"caption\":\"jonallen\"},\"logo\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/www.jibsheet.net\/linux\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Find command - listing last modify path with full dir - Jon Allen&#039;s Linux Stuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/","og_locale":"en_US","og_type":"article","og_title":"Find command - listing last modify path with full dir - Jon Allen&#039;s Linux Stuff","og_description":"Some examples of this command from Linux Debian and FreeBSD &nbsp; Here is how to do this with GNU Linux &#8211; %p gives full path name &nbsp; user1@f1-google-joniowa:~$ find . -name \"weather_obs.log\" -printf \"%pt%TY-%Tm-%Tdn\" .\/test27\/weather_obs\/weather_obs.log 2023-05-16 .\/test26\/weather_obs\/weather_obs.log 2022-12-08 .\/test28\/weather_obs\/weather_obs.log 2023-02-28 .\/test25\/weather_obs\/weather_obs.log 2022-08-18 .\/python\/weather_obs\/weather_obs.log 2021-05-24 .\/test24\/weather_obs\/weather_obs.log 2022-11-22 Here is a bsd version &#8211;\u00a0 \u00a0uses exec &nbsp; [user1@freebsd12_3 ~]$ find . -name [&hellip;]","og_url":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/","og_site_name":"Jon Allen&#039;s Linux Stuff","article_published_time":"2023-05-16T14:14:44+00:00","article_modified_time":"2023-05-16T14:14:56+00:00","author":"jonallen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"jonallen","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/#article","isPartOf":{"@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/"},"author":{"name":"jonallen","@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993"},"headline":"Find command &#8211; listing last modify path with full dir","datePublished":"2023-05-16T14:14:44+00:00","dateModified":"2023-05-16T14:14:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/"},"wordCount":62,"commentCount":0,"publisher":{"@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993"},"keywords":["unix"],"articleSection":["bash","BSD","Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/","url":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/","name":"Find command - listing last modify path with full dir - Jon Allen&#039;s Linux Stuff","isPartOf":{"@id":"https:\/\/www.jibsheet.net\/linux\/#website"},"datePublished":"2023-05-16T14:14:44+00:00","dateModified":"2023-05-16T14:14:56+00:00","breadcrumb":{"@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2023\/05\/16\/find-command-listing-last-modify-path-with-full-dir\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.jibsheet.net\/linux\/"},{"@type":"ListItem","position":2,"name":"Find command &#8211; listing last modify path with full dir"}]},{"@type":"WebSite","@id":"https:\/\/www.jibsheet.net\/linux\/#website","url":"https:\/\/www.jibsheet.net\/linux\/","name":"Jon Allen's Linux Stuff","description":"Howto&#039;s, Observations, and stuff","publisher":{"@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.jibsheet.net\/linux\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993","name":"jonallen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7d7c061ce9db8f5e4710555585475882?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7d7c061ce9db8f5e4710555585475882?s=96&d=mm&r=g","caption":"jonallen"},"logo":{"@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/www.jibsheet.net\/linux"]}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/posts\/366"}],"collection":[{"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/comments?post=366"}],"version-history":[{"count":2,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/posts\/366\/revisions"}],"predecessor-version":[{"id":368,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/posts\/366\/revisions\/368"}],"wp:attachment":[{"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/media?parent=366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/categories?post=366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/tags?post=366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}