<?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: question about file manipulation in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-file-manipulation/m-p/4687149#M382919</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Why not simply do:&lt;BR /&gt;&lt;BR /&gt;# touch -m CCYYMMDDhhmm /tmp/myref&lt;BR /&gt;# cd /path&lt;BR /&gt;# find . -type f ! -newer /tmp/myref -exec rm {} +&lt;BR /&gt;&lt;BR /&gt;Substitute whatever date (e.g. 201009010001) for the "CCYYMMDDhhmm" string.&lt;BR /&gt;&lt;BR /&gt;The 'find()' will return files that are *not* newer (more recent) than the reference point (file) created.  Hence these files are *old* and are the ones you want to remove.&lt;BR /&gt;&lt;BR /&gt;If you need to, you can *and* the match of the filename to the pattern you seek, like:&lt;BR /&gt;&lt;BR /&gt;# find . -type f ! -newer /tmp/myref -name "*pc.comm-err_log*" -exec rm {} +&lt;BR /&gt;&lt;BR /&gt;For testing purposes, change the 'rm {}' to 'echo {}' until you are satisfied that you will find what you want.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 15 Sep 2010 19:33:13 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2010-09-15T19:33:13Z</dc:date>
    <item>
      <title>question about file manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-file-manipulation/m-p/4687148#M382918</link>
      <description>Hi &lt;BR /&gt;I have to remove files older than certain date within the dir - the files are look like the below format.Can you please suggest a string to do that.&lt;BR /&gt;filename.web.pc.com-err_log.xxxxx&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 15 Sep 2010 18:57:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-file-manipulation/m-p/4687148#M382918</guid>
      <dc:creator>navin</dc:creator>
      <dc:date>2010-09-15T18:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: question about file manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-file-manipulation/m-p/4687149#M382919</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Why not simply do:&lt;BR /&gt;&lt;BR /&gt;# touch -m CCYYMMDDhhmm /tmp/myref&lt;BR /&gt;# cd /path&lt;BR /&gt;# find . -type f ! -newer /tmp/myref -exec rm {} +&lt;BR /&gt;&lt;BR /&gt;Substitute whatever date (e.g. 201009010001) for the "CCYYMMDDhhmm" string.&lt;BR /&gt;&lt;BR /&gt;The 'find()' will return files that are *not* newer (more recent) than the reference point (file) created.  Hence these files are *old* and are the ones you want to remove.&lt;BR /&gt;&lt;BR /&gt;If you need to, you can *and* the match of the filename to the pattern you seek, like:&lt;BR /&gt;&lt;BR /&gt;# find . -type f ! -newer /tmp/myref -name "*pc.comm-err_log*" -exec rm {} +&lt;BR /&gt;&lt;BR /&gt;For testing purposes, change the 'rm {}' to 'echo {}' until you are satisfied that you will find what you want.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Sep 2010 19:33:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-file-manipulation/m-p/4687149#M382919</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-09-15T19:33:13Z</dc:date>
    </item>
  </channel>
</rss>

