<?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: File time check in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285009#M181083</link>
    <description>CurrentDate=`date +%Y%m%d%H%M`&lt;BR /&gt;Date2Match=`expr $CurrentDate - 60`&lt;BR /&gt;touch -t $Date2Match myfile.$$&lt;BR /&gt;find ... -newer myfile.$$ ...&lt;BR /&gt;rm myfile.$$&lt;BR /&gt;&lt;BR /&gt;... or something like that :)&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
    <pubDate>Mon, 24 May 2004 12:00:46 GMT</pubDate>
    <dc:creator>Fred Ruffet</dc:creator>
    <dc:date>2004-05-24T12:00:46Z</dc:date>
    <item>
      <title>File time check</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285005#M181079</link>
      <description>I need to shell command/script that can check the files in a directory to see if they're older than XX minutes.  The find command only allows for days.  Any suggestions?</description>
      <pubDate>Mon, 24 May 2004 11:29:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285005#M181079</guid>
      <dc:creator>Luis E. Giner_1</dc:creator>
      <dc:date>2004-05-24T11:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: File time check</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285006#M181080</link>
      <description>Use the touch command to set the date/time onto a file attribute, then use "newer" option in find-&lt;BR /&gt; &lt;BR /&gt;touch 200405240800 /tmp/afile&lt;BR /&gt;find . ! -newer /tmp/afile -print&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 24 May 2004 11:31:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285006#M181080</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-05-24T11:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: File time check</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285007#M181081</link>
      <description>That's a great idea but this will be automated.  How do I tell the script to touch a file but make it 60 minutes older than the current time?  Thanks for your time and suggestions.</description>
      <pubDate>Mon, 24 May 2004 11:36:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285007#M181081</guid>
      <dc:creator>Luis E. Giner_1</dc:creator>
      <dc:date>2004-05-24T11:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: File time check</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285008#M181082</link>
      <description>Correction on "touch" command&lt;BR /&gt; &lt;BR /&gt;touch -t 200405230815.30 /tmp/afile&lt;BR /&gt; &lt;BR /&gt;Will set /tmp/afile last modify time to 5/23/2004 8:15:30&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
      <pubDate>Mon, 24 May 2004 11:37:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285008#M181082</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-05-24T11:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: File time check</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285009#M181083</link>
      <description>CurrentDate=`date +%Y%m%d%H%M`&lt;BR /&gt;Date2Match=`expr $CurrentDate - 60`&lt;BR /&gt;touch -t $Date2Match myfile.$$&lt;BR /&gt;find ... -newer myfile.$$ ...&lt;BR /&gt;rm myfile.$$&lt;BR /&gt;&lt;BR /&gt;... or something like that :)&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Mon, 24 May 2004 12:00:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285009#M181083</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-05-24T12:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: File time check</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285010#M181084</link>
      <description>If you don't mind using "perl"-&lt;BR /&gt; &lt;BR /&gt;perl -e 'use File::Find; find(\&amp;amp;wanted,"."); sub wanted { print $File::Find::name,"\n" if (stat($_))[9] &amp;lt; time-3600; }'&lt;BR /&gt; &lt;BR /&gt;This will print files under the current directory that are more than 60 minutes old.&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 24 May 2004 12:12:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285010#M181084</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-05-24T12:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: File time check</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285011#M181085</link>
      <description>The expr part doesn't subtract 60.  I get a strange number and the touch gets a bad conversion error.&lt;BR /&gt;&lt;BR /&gt;CurrentDate=`date +%Y%m%d%H%M`&lt;BR /&gt;Date2Match=`expr $CurrentDate - 60`&lt;BR /&gt;touch -t $Date2Match myfile.$$&lt;BR /&gt;find ... -newer myfile.$$ ...&lt;BR /&gt;rm myfile.$$&lt;BR /&gt;</description>
      <pubDate>Mon, 24 May 2004 12:24:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285011#M181085</guid>
      <dc:creator>Luis E. Giner_1</dc:creator>
      <dc:date>2004-05-24T12:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: File time check</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285012#M181086</link>
      <description>well for just an hour difference,&lt;BR /&gt;you could change your timezone.&lt;BR /&gt;&lt;BR /&gt;such as this, if your in the us eastern timezone.&lt;BR /&gt;&lt;BR /&gt;oldTZ="$TZ"&lt;BR /&gt;TZ="CST6CDT"&lt;BR /&gt;TZ="$oldTZ"&lt;BR /&gt;&lt;BR /&gt;now=$(date +format)&lt;BR /&gt;&lt;BR /&gt;touch -t "$now" file&lt;BR /&gt;etc...&lt;BR /&gt;&lt;BR /&gt;for a more generic solution, you'll probably want to write a perl script to be able to subract an abitrary amount.&lt;BR /&gt;&lt;BR /&gt;or you could use Mr. Stephenson's calendar script from this site at the bottom of the page&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://mirrors.develooper.com/hpux/" target="_blank"&gt;http://mirrors.develooper.com/hpux/&lt;/A&gt;</description>
      <pubDate>Mon, 24 May 2004 12:57:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-time-check/m-p/3285012#M181086</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2004-05-24T12:57:48Z</dc:date>
    </item>
  </channel>
</rss>

