<?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: housekeeping script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-script/m-p/5412535#M639860</link>
    <description>&lt;P&gt;&amp;gt;1) move the files that older than 30 days in current directory to /tmp/30days&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;find . -type f -mtime +30 -exec mv {} /tmp/30days \;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;2) check the files in /tmp/30days, if any file older than 60 days, remove it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;find /tmp/30days -type f -mtime +60 -exec rm -f {} +&lt;/P&gt;</description>
    <pubDate>Thu, 08 Dec 2011 10:26:15 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2011-12-08T10:26:15Z</dc:date>
    <item>
      <title>housekeeping script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-script/m-p/5412455#M639859</link>
      <description>&lt;P&gt;I am not familiar with writing script , I would like to write a script to do the following housekeeping task&lt;/P&gt;&lt;P&gt;1) move the files that elder than 30 days in current directory to /tmp/30days ;&lt;BR /&gt;2) check the files in /tmp/30days , if any file elder than 60 days , remove it.&lt;BR /&gt;3) copy the files in /tmp/30days which are created on the first day of the month ( 1st of every month ) to /tmp/firstday , so that it keeps all first day files.&lt;/P&gt;&lt;P&gt;can advise what can i do ?&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2011 09:33:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-script/m-p/5412455#M639859</guid>
      <dc:creator>Intothenewworld</dc:creator>
      <dc:date>2011-12-08T09:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: housekeeping script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-script/m-p/5412535#M639860</link>
      <description>&lt;P&gt;&amp;gt;1) move the files that older than 30 days in current directory to /tmp/30days&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;find . -type f -mtime +30 -exec mv {} /tmp/30days \;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;2) check the files in /tmp/30days, if any file older than 60 days, remove it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;find /tmp/30days -type f -mtime +60 -exec rm -f {} +&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2011 10:26:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-script/m-p/5412535#M639860</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-12-08T10:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: housekeeping script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-script/m-p/5415329#M639861</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt; 3) copy the files in /tmp/30days which are created on the first day of the month ( 1st of every month ) to /tmp/firstday , so that it keeps all first day files&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(ll /tmp/30days |&amp;nbsp; grep -E "Jan&amp;nbsp; 1|Feb&amp;nbsp; 1| ..." | awk '{print $9}') | xargs -i -t mv {}&amp;nbsp; /tmp/firstday&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rgs,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2011 13:01:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-script/m-p/5415329#M639861</guid>
      <dc:creator>rariasn</dc:creator>
      <dc:date>2011-12-12T13:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: housekeeping script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-script/m-p/5415727#M639862</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt; 3) copy the files in /tmp/30days which are created on the first day of the month&lt;BR /&gt;&amp;gt;(ll /tmp/30days |&amp;nbsp; grep -E "Jan&amp;nbsp; 1|Feb&amp;nbsp; 1| ... ) |&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(You don't really need those () for a subshell.)&lt;/P&gt;&lt;P&gt;And note these are really files modified on the first, not created.&amp;nbsp; The latter time isn't kept on HP-UX.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2011 20:10:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/housekeeping-script/m-p/5415727#M639862</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-12-12T20:10:01Z</dc:date>
    </item>
  </channel>
</rss>

