<?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: removing files based on date? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720507#M63025</link>
    <description>Hi Eric,&lt;BR /&gt;&lt;BR /&gt;You can also reference an existing file:&lt;BR /&gt;&lt;BR /&gt;find . -type f ! -newer filename | xargs rm&lt;BR /&gt;&lt;BR /&gt;will remove any file older than "filename".&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
    <pubDate>Thu, 09 May 2002 12:40:03 GMT</pubDate>
    <dc:creator>Robin Wakefield</dc:creator>
    <dc:date>2002-05-09T12:40:03Z</dc:date>
    <item>
      <title>removing files based on date?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720504#M63022</link>
      <description>I need to remove files in a directory based on the date of the file and not on the name.&lt;BR /&gt;&lt;BR /&gt;What syntax could I use. &lt;BR /&gt;&lt;BR /&gt;Like if I wanted to remove all files from May 1.</description>
      <pubDate>Thu, 09 May 2002 12:28:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720504#M63022</guid>
      <dc:creator>Eric_63</dc:creator>
      <dc:date>2002-05-09T12:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: removing files based on date?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720505#M63023</link>
      <description>find /directory -mtime +30 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;would remove all files not accessed in the last 30 days.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 09 May 2002 12:31:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720505#M63023</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-05-09T12:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: removing files based on date?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720506#M63024</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can use the find command with the -mtime, atime, -ctime option.&lt;BR /&gt;&lt;BR /&gt;eg &lt;BR /&gt;find . -mtime 10 -name -exec rm {}\;&lt;BR /&gt;&lt;BR /&gt;-Sukant</description>
      <pubDate>Thu, 09 May 2002 12:31:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720506#M63024</guid>
      <dc:creator>Sukant Naik</dc:creator>
      <dc:date>2002-05-09T12:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: removing files based on date?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720507#M63025</link>
      <description>Hi Eric,&lt;BR /&gt;&lt;BR /&gt;You can also reference an existing file:&lt;BR /&gt;&lt;BR /&gt;find . -type f ! -newer filename | xargs rm&lt;BR /&gt;&lt;BR /&gt;will remove any file older than "filename".&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Thu, 09 May 2002 12:40:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720507#M63025</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-05-09T12:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: removing files based on date?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720508#M63026</link>
      <description>You can even do range of date, for example ..&lt;BR /&gt;&lt;BR /&gt;find . \( -newer refA -a ! -newer refB \) -exec rm -rf {} \;&lt;BR /&gt;&lt;BR /&gt;refA=by touching a file with the starting timestamp&lt;BR /&gt;refB=by touching a file with the ending timetamp</description>
      <pubDate>Thu, 09 May 2002 12:50:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720508#M63026</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-05-09T12:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: removing files based on date?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720509#M63027</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;for example, if u want delete all files in /tmp which were created/copied/accessed from May 1st, u try the following.&lt;BR /&gt;&lt;BR /&gt;find /tmp -type f -atime -9 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;this will delete all the files which were accessed during last 9 days, that is from May 1st to today.&lt;BR /&gt;&lt;BR /&gt;hope this helps&lt;BR /&gt;ravi</description>
      <pubDate>Thu, 09 May 2002 15:04:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720509#M63027</guid>
      <dc:creator>V. V. Ravi Kumar_1</dc:creator>
      <dc:date>2002-05-09T15:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: removing files based on date?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720510#M63028</link>
      <description>Hi Eric&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I use awk for the same like this&lt;BR /&gt;&lt;BR /&gt;rm -i `ls -l | awk '{if($6=="May" &amp;amp;&amp;amp; $7=="1") print $NF}'`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;this will delete files created on May 1 only , you can be creative with == &amp;amp;&amp;amp; &amp;gt;&amp;gt; and &amp;lt;&amp;lt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Thu, 09 May 2002 15:53:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720510#M63028</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-05-09T15:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: removing files based on date?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720511#M63029</link>
      <description>Thanks for all the replies.</description>
      <pubDate>Thu, 09 May 2002 18:33:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/removing-files-based-on-date/m-p/2720511#M63029</guid>
      <dc:creator>Eric_63</dc:creator>
      <dc:date>2002-05-09T18:33:31Z</dc:date>
    </item>
  </channel>
</rss>

