<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: find command - file modification date in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147380#M796530</link>
    <description>Renetta -&lt;BR /&gt;This is the find command I use for a daily cleanup of one of out /tmp directories.&lt;BR /&gt;&lt;BR /&gt;find /tmp/ -type f -mtime -1 &amp;gt; output_file&lt;BR /&gt;&lt;BR /&gt;This is for all files within the last 24 hours.&lt;BR /&gt;To eliminate today's:&lt;BR /&gt;&lt;BR /&gt;grep -v "date '+%b %m'" output_file &amp;gt; delete_file&lt;BR /&gt;&lt;BR /&gt;Of course your cript will have to sed or cut the file name field.&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
    <pubDate>Wed, 17 Dec 2003 18:44:55 GMT</pubDate>
    <dc:creator>Dave La Mar</dc:creator>
    <dc:date>2003-12-17T18:44:55Z</dc:date>
    <item>
      <title>find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147364#M796514</link>
      <description>I'm trying to find and list files (eventually remove them) that have a modification/creation date of previous day.  I'm trying&lt;BR /&gt;find /u01/app/oasist/pbin/*.log -mtime -1 -exec ls -la {} \;&lt;BR /&gt;but it's giving me a listing of files from today and yesterday.</description>
      <pubDate>Wed, 17 Dec 2003 12:26:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147364#M796514</guid>
      <dc:creator>Renetta Brown_1</dc:creator>
      <dc:date>2003-12-17T12:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147365#M796515</link>
      <description>find /u01/app/oasist/pbin/*.log -mtime +1 -exec ls -la {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 17 Dec 2003 12:27:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147365#M796515</guid>
      <dc:creator>DIPAK KUMAR ROY</dc:creator>
      <dc:date>2003-12-17T12:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147366#M796516</link>
      <description>Thanks, but that doesn't list the files from yesterday either, but, it does exclude those from today and yesterday.  (lists 1 that I have from April of 2002)&lt;BR /&gt;&lt;BR /&gt;maic_dev2:/u01/app/oasist/pbin&amp;gt; find /u01/app/oasist/pbin/*.log -mtime +5 -exec ls -la {} \;&lt;BR /&gt;-rwxr-xr-x   1 oasis      dba              0 Apr 11  2002 /u01/app/oasist/pbin/bill_eng.log&lt;BR /&gt;&lt;BR /&gt;I'd like to only get/remove the file from yesterday, December 16th.&lt;BR /&gt;&lt;BR /&gt;-rw-------   1 root       sys          15092 Dec 16 20:23 /u01/app/oasist/pbin/12_16_103.log&lt;BR /&gt;-rw-r--r--   1 oasis      dba            875 Dec 17 10:19 /u01/app/oasist/pbin/12_17_103.log</description>
      <pubDate>Wed, 17 Dec 2003 13:19:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147366#M796516</guid>
      <dc:creator>Renetta Brown_1</dc:creator>
      <dc:date>2003-12-17T13:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147367#M796517</link>
      <description>Please check your command. You typed it wrong. ( +5 instead of +1)&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 17 Dec 2003 14:08:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147367#M796517</guid>
      <dc:creator>DIPAK KUMAR ROY</dc:creator>
      <dc:date>2003-12-17T14:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147368#M796518</link>
      <description>Whay find?&lt;BR /&gt;&lt;BR /&gt;ll -ct|grep -i "Dec 16"</description>
      <pubDate>Wed, 17 Dec 2003 14:12:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147368#M796518</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2003-12-17T14:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147369#M796519</link>
      <description>Same result with +5 or +1:&lt;BR /&gt;maic_dev2:/u01/app/oasist/pbin&amp;gt; find /u01/app/oasist/pbin/*.log -mtime +1 -exec ls -la {} \;&lt;BR /&gt;-rwxr-xr-x   1 oasis      dba              0 Apr 11  2002 &lt;BR /&gt;&lt;BR /&gt;maic_dev2:/u01/app/oasist/pbin&amp;gt; find /u01/app/oasist/pbin/*.log -mtime +5 -exec ls -la {} \;&lt;BR /&gt;-rwxr-xr-x   1 oasis      dba              0 Apr 11  2002 /u01/app/oasist/pbin/bill_eng.log&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Dec 2003 14:13:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147369#M796519</guid>
      <dc:creator>Renetta Brown_1</dc:creator>
      <dc:date>2003-12-17T14:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147370#M796520</link>
      <description>You could always use grep to search for the specific date.  You could also use the touch command to create reference file(s) with the correct time(s) and the "-newer" option of find to locate files that fall between those correct times.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 17 Dec 2003 14:15:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147370#M796520</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-12-17T14:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147371#M796521</link>
      <description>Hi,&lt;BR /&gt;how about this:&lt;BR /&gt; &lt;BR /&gt;# find /u01/app/oasist/pbin/*.log -type f \( -mtime +0 -a -mtime -2 \) -exec ls -ltr {} \;&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K. &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Dec 2003 14:17:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147371#M796521</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-12-17T14:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147372#M796522</link>
      <description>I want the process automated, so, I don't want to supply date every time. (or have to code something to supply it)</description>
      <pubDate>Wed, 17 Dec 2003 14:18:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147372#M796522</guid>
      <dc:creator>Renetta Brown_1</dc:creator>
      <dc:date>2003-12-17T14:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147373#M796523</link>
      <description>Thanks, but this one didn't retrive anything...&lt;BR /&gt;maic_dev2:/u01/app/oasist/pbin&amp;gt; find /u01/app/oasist/pbin/*.log -type f \( -mtime +0 -a -mtime -2 \) -exec ls -ltr {} \;&lt;BR /&gt;maic_dev2:/u01/app/oasist/pbin&amp;gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Dec 2003 14:20:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147373#M796523</guid>
      <dc:creator>Renetta Brown_1</dc:creator>
      <dc:date>2003-12-17T14:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147374#M796524</link>
      <description>&lt;BR /&gt;export YESTERDAY=$(TZ=$(date +%Z)+24; date '+%b %e')  &lt;BR /&gt;&lt;BR /&gt;ll|grep -i ${YESTERDAY}&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Dec 2003 14:28:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147374#M796524</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2003-12-17T14:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147375#M796525</link>
      <description>???&lt;BR /&gt;&lt;BR /&gt;maic_dev2:/u01/app/oasist/pbin&amp;gt; ll|grep -i ${YESTERDAY} &lt;BR /&gt;grep: can't open 16&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Dec 2003 14:33:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147375#M796525</guid>
      <dc:creator>Renetta Brown_1</dc:creator>
      <dc:date>2003-12-17T14:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147376#M796526</link>
      <description>export YESTERDAY=$(TZ=$(date +%Z)+24; date '+%b %e') &lt;BR /&gt;&lt;BR /&gt;ll|grep -i "${YESTERDAY}" &lt;BR /&gt;&lt;BR /&gt;note double quotes</description>
      <pubDate>Wed, 17 Dec 2003 14:42:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147376#M796526</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2003-12-17T14:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147377#M796527</link>
      <description>Success!  Thanks!</description>
      <pubDate>Wed, 17 Dec 2003 14:44:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147377#M796527</guid>
      <dc:creator>Renetta Brown_1</dc:creator>
      <dc:date>2003-12-17T14:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147378#M796528</link>
      <description>Here you go:&lt;BR /&gt;&lt;BR /&gt;# find /u01/app/oasist/pbin/*log -mtime 1 -exec ls -al {} \;&lt;BR /&gt;&lt;BR /&gt;Note the "1" and not +1 or -1. This what each one of it will do:&lt;BR /&gt;&lt;BR /&gt;1 - between 24 and 48 hours old&lt;BR /&gt;+1 - 48 hours or older&lt;BR /&gt;-1 - within 24 hours&lt;BR /&gt;&lt;BR /&gt;Please remember that -mtime calculates times in 24 hours and not in actual *days* as we calculate.</description>
      <pubDate>Wed, 17 Dec 2003 14:47:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147378#M796528</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2003-12-17T14:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147379#M796529</link>
      <description>Thanks for that info...</description>
      <pubDate>Wed, 17 Dec 2003 14:50:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147379#M796529</guid>
      <dc:creator>Renetta Brown_1</dc:creator>
      <dc:date>2003-12-17T14:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147380#M796530</link>
      <description>Renetta -&lt;BR /&gt;This is the find command I use for a daily cleanup of one of out /tmp directories.&lt;BR /&gt;&lt;BR /&gt;find /tmp/ -type f -mtime -1 &amp;gt; output_file&lt;BR /&gt;&lt;BR /&gt;This is for all files within the last 24 hours.&lt;BR /&gt;To eliminate today's:&lt;BR /&gt;&lt;BR /&gt;grep -v "date '+%b %m'" output_file &amp;gt; delete_file&lt;BR /&gt;&lt;BR /&gt;Of course your cript will have to sed or cut the file name field.&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
      <pubDate>Wed, 17 Dec 2003 18:44:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147380#M796530</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2003-12-17T18:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147381#M796531</link>
      <description>Great! Is there a way to list it the long way?  Like this : &lt;BR /&gt;&lt;BR /&gt;-rw-r--r--   1 rahxgb     users         3552 Apr  4  2000 mailqmon.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2004 15:16:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147381#M796531</guid>
      <dc:creator>Dan_242</dc:creator>
      <dc:date>2004-02-11T15:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: find command - file modification date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147382#M796532</link>
      <description>Sorry, I don't think that questions was very clear.  What I ment to ask was if there was a way write to output_file that would list the the long format as in "ls -al"...&lt;BR /&gt;&lt;BR /&gt;- Dan</description>
      <pubDate>Wed, 11 Feb 2004 15:24:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-file-modification-date/m-p/3147382#M796532</guid>
      <dc:creator>Dan_242</dc:creator>
      <dc:date>2004-02-11T15:24:22Z</dc:date>
    </item>
  </channel>
</rss>

