<?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: date script syntax in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441972#M7856</link>
    <description>Attaching the man page for the script.</description>
    <pubDate>Thu, 31 Aug 2000 23:25:16 GMT</pubDate>
    <dc:creator>Sundararajan Anandhan</dc:creator>
    <dc:date>2000-08-31T23:25:16Z</dc:date>
    <item>
      <title>date script syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441970#M7854</link>
      <description>I am trying to set up a script that will be run by cron to clean up date stamped log files&lt;BR /&gt;two days old.  I can get the date to format right.  ie date -u +%m%d%Y I just can't figure how to get hte system to return it two day later in the script.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 31 Aug 2000 22:28:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441970#M7854</guid>
      <dc:creator>Michael Windbigler</dc:creator>
      <dc:date>2000-08-31T22:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: date script syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441971#M7855</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;There are few datecalc utilities available to manipulate dates. I myself have written one. Use this script to find the date two days back and then delete them. &lt;BR /&gt;&lt;BR /&gt;You can also get a simillar utility in &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/" target="_blank"&gt;http://hpux.cs.utah.edu/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Attaching my script.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Sundar&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Aug 2000 23:24:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441971#M7855</guid>
      <dc:creator>Sundararajan Anandhan</dc:creator>
      <dc:date>2000-08-31T23:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: date script syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441972#M7856</link>
      <description>Attaching the man page for the script.</description>
      <pubDate>Thu, 31 Aug 2000 23:25:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441972#M7856</guid>
      <dc:creator>Sundararajan Anandhan</dc:creator>
      <dc:date>2000-08-31T23:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: date script syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441973#M7857</link>
      <description>A suggestion , why don't you use the find command to delete files 2 days old e.g.&lt;BR /&gt;find &lt;DIRECTORY where="" your="" log="" files="" are=""&gt; -type f -mtime +2 -exec rm -f {} ;&lt;BR /&gt;&lt;BR /&gt;laters&lt;/DIRECTORY&gt;</description>
      <pubDate>Fri, 01 Sep 2000 06:03:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441973#M7857</guid>
      <dc:creator>Devbinder Singh Marway</dc:creator>
      <dc:date>2000-09-01T06:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: date script syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441974#M7858</link>
      <description>A suggestion , why don't you use the find command to delete files 2 days old e.g.&lt;BR /&gt;find &lt;DIRECTORY where="" your="" log="" files="" are=""&gt; -type f -mtime +2 -exec rm -f {} ;&lt;BR /&gt;&lt;BR /&gt;laters&lt;/DIRECTORY&gt;</description>
      <pubDate>Fri, 01 Sep 2000 06:04:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441974#M7858</guid>
      <dc:creator>Devbinder Singh Marway</dc:creator>
      <dc:date>2000-09-01T06:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: date script syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441975#M7859</link>
      <description>Watch the -u switch in the date command you have provided above. The -u switch will provide GMT. You may want date-times that are within the time zone in which you reside, in which case drop the -u switch.</description>
      <pubDate>Fri, 01 Sep 2000 11:56:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441975#M7859</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2000-09-01T11:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: date script syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441976#M7860</link>
      <description>This really does seem a job for find.  I would recommend limiting the search to files which match a specific pattern, unless you are certain that only the date_stamoed iles you seek are under a directory path.  Something like:&lt;BR /&gt;&lt;BR /&gt;find $LOG_DIR -name $LOG_FORMAT* -mtime +1 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;note:  mtime +1 takes all files 2 days old or older.  mtime 2 would select those files exactly two days old.</description>
      <pubDate>Fri, 01 Sep 2000 14:56:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-script-syntax/m-p/2441976#M7860</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-09-01T14:56:57Z</dc:date>
    </item>
  </channel>
</rss>

