<?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: Delete files using time stamp in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139075#M688874</link>
    <description>Here are some similar threads:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1133772" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1133772&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1254376" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1254376&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1204021" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1204021&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1053038" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1053038&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1107387" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1107387&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1221713" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1221713&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1222831" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1222831&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227620" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227620&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227469" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227469&lt;/A&gt;</description>
    <pubDate>Tue, 04 Nov 2008 07:33:55 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-11-04T07:33:55Z</dc:date>
    <item>
      <title>Delete files using time stamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139074#M688873</link>
      <description>Hi all ,&lt;BR /&gt;&lt;BR /&gt;I want to delete the files of 2004 from my directory?Is there any way to remove the files using time stamp?&lt;BR /&gt;Could you please help me to find out a solution?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Muktha</description>
      <pubDate>Tue, 04 Nov 2008 07:09:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139074#M688873</guid>
      <dc:creator>Muktha</dc:creator>
      <dc:date>2008-11-04T07:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Delete files using time stamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139075#M688874</link>
      <description>Here are some similar threads:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1133772" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1133772&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1254376" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1254376&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1204021" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1204021&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1053038" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1053038&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1107387" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1107387&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1221713" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1221713&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1222831" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1222831&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227620" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227620&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227469" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227469&lt;/A&gt;</description>
      <pubDate>Tue, 04 Nov 2008 07:33:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139075#M688874</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-11-04T07:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Delete files using time stamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139076#M688875</link>
      <description>Hi Muktha:&lt;BR /&gt;&lt;BR /&gt;The following solutions assume the you want to REMOVE any file last modified in 2004.  To test, change 'rm' to 'echo'.&lt;BR /&gt;&lt;BR /&gt;# cd /path&lt;BR /&gt;# ls -al|awk '/^-/ &amp;amp;&amp;amp; $8~2004 {print $NF}'|xargs -i rm {}&lt;BR /&gt;&lt;BR /&gt;This works for the specified directory and not for files in subordinate directories.&lt;BR /&gt;&lt;BR /&gt;If you do want to descend into all subordinate directories, simply use:&lt;BR /&gt;&lt;BR /&gt;# cd /path&lt;BR /&gt;# find . -type f -exec ls -al {}+|awk '/^-/ &amp;amp;&amp;amp; $8~2004 {print $NF}'|xargs -i rm {}&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 04 Nov 2008 13:23:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139076#M688875</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-11-04T13:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Delete files using time stamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139077#M688876</link>
      <description>Hi (again) Muktha:&lt;BR /&gt;&lt;BR /&gt;In keeping with TMTOWTDI, here's a pure Perl solution you could use.  Change the value of 2004 to any year you want, *including* the current year.&lt;BR /&gt;&lt;BR /&gt;Change the 'print' to 'unlink' and instead of actually printing the file names you will *remove* them:&lt;BR /&gt;&lt;BR /&gt;# perl -MFile::Find -le '$Y=2004;find(sub{-f $_ &amp;amp;&amp;amp; ((localtime((stat(_))[9]))[5]+1900==$Y) &amp;amp;&amp;amp; print $File::Find::name},@ARGV)' /path&lt;BR /&gt;&lt;BR /&gt;You can also pass multiple paths as arguments or a dot ('.') to signify (of course) the current directory.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Nov 2008 14:20:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139077#M688876</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-11-04T14:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Delete files using time stamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139078#M688877</link>
      <description>I love referencing this. Touch.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To remove dated files. Can be modified to remove sized files as well.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# touch -amt 200504150000 /tmp/ref1&lt;BR /&gt;# touch -amt 200802282359 /tmp/ref2&lt;BR /&gt;&lt;BR /&gt;# find /opt/mtmc/ibs/import/reject -xdev -type f -newer /tmp/ref1 -a ! -newer /tmp/ref2 -exec rm {} \+&lt;BR /&gt;&lt;BR /&gt;This will remove files that are newer (more recently modified) than April 15 at 0000 AND NOT newer than Feb, 28th 2359 of this year&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;time Use the specified time instead of the current time.&lt;BR /&gt;The option argument is a decimal number of the form&lt;BR /&gt;&lt;BR /&gt;[[CC]YY]MMDDhhmm[.SS]&lt;BR /&gt;&lt;BR /&gt;where each two digits represents the following:&lt;BR /&gt;&lt;BR /&gt;CC The first two digits of the year.&lt;BR /&gt;&lt;BR /&gt;YY The second two digits of the year.&lt;BR /&gt;&lt;BR /&gt;MM The month of the year (01-12).&lt;BR /&gt;&lt;BR /&gt;DD The day of the month (01-31).&lt;BR /&gt;&lt;BR /&gt;hh The hour of the day (00-23).&lt;BR /&gt;&lt;BR /&gt;mm The minute of the hour (00-59).&lt;BR /&gt;&lt;BR /&gt;SS The second of the minute (00-61).&lt;BR /&gt;&lt;BR /&gt;If neither CC nor YY is given, the current year is&lt;BR /&gt;assumed. If YY is specified, but CC is not, CC is&lt;BR /&gt;derived as follows: (taken into account the local time&lt;BR /&gt;factor)&lt;BR /&gt;&lt;BR /&gt;If YY is: CC becomes:&lt;BR /&gt;_______________________&lt;BR /&gt;69-99 19&lt;BR /&gt;00-68 20&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If the resulting time value precedes the Epoch&lt;BR /&gt;(00:00:00 January 1, 1970 Greenwich Mean Time), touch&lt;BR /&gt;exits immediately with an error status.&lt;BR /&gt;&lt;BR /&gt;The range for SS is 00 through 61 rather than 00&lt;BR /&gt;through 59 to accommodate leap seconds. If SS is 60 or&lt;BR /&gt;61, and the resulting time, as affected by the TZ&lt;BR /&gt;environment variable, does not refer to a leap second,&lt;BR /&gt;the resulting time is one second after a time where SS&lt;BR /&gt;is 59. If SS is not given a value, it is assumed to be&lt;BR /&gt;0.&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Nov 2008 14:48:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139078#M688877</guid>
      <dc:creator>Adam W.</dc:creator>
      <dc:date>2008-11-04T14:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Delete files using time stamp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139079#M688878</link>
      <description>Thanks to all...</description>
      <pubDate>Thu, 06 Nov 2008 07:26:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-files-using-time-stamp/m-p/5139079#M688878</guid>
      <dc:creator>Muktha</dc:creator>
      <dc:date>2008-11-06T07:26:24Z</dc:date>
    </item>
  </channel>
</rss>

