<?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: Finding files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190149#M323587</link>
    <description>Dear all&lt;BR /&gt;        I'll give you a better picture of my problem.&lt;BR /&gt;I'm exporting the oracle DB every two hours. I want to keep only the last two or three backups,rest of the files should be removed. I'm using a script to automate this process, in witch I'm using mtime option to find the files. So, system keeps 12 copies of backup files and rest of the files are removed. &lt;BR /&gt;&lt;BR /&gt;Regards</description>
    <pubDate>Thu, 01 May 2008 10:12:51 GMT</pubDate>
    <dc:creator>akarayil</dc:creator>
    <dc:date>2008-05-01T10:12:51Z</dc:date>
    <item>
      <title>Finding files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190145#M323583</link>
      <description>Dear Experts,&lt;BR /&gt;&lt;BR /&gt;    If I want to find the files  which are modified (or created) 6 hours ago which option I can use along with find cmd.&lt;BR /&gt;OS: HPUX 11.23&lt;BR /&gt;&lt;BR /&gt;In Linux, there is an option mmin, that works fine. This is not working in HPUX. &lt;BR /&gt;&lt;BR /&gt;Do you have any solution?&lt;BR /&gt;&lt;BR /&gt;regards</description>
      <pubDate>Thu, 01 May 2008 08:42:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190145#M323583</guid>
      <dc:creator>akarayil</dc:creator>
      <dc:date>2008-05-01T08:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Finding files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190146#M323584</link>
      <description>That option isn't available, only -mtime for days.  You need to create a reference file and use -newer.  See this thread:&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>Thu, 01 May 2008 09:00:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190146#M323584</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-05-01T09:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Finding files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190147#M323585</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can play with the touch command.&lt;BR /&gt;&lt;BR /&gt;Create a file with time stamp 6 hours before current time :&lt;BR /&gt;touch -t YYMMDDhhmm /tmp/stamp&lt;BR /&gt;and run find / -newer /tmp/stamp&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Thu, 01 May 2008 09:09:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190147#M323585</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2008-05-01T09:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Finding files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190148#M323586</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;You can use the sample perl scriptd to find your criteria&lt;BR /&gt;&lt;BR /&gt;perl -MFile::Find -le 'find(sub{print $File::Find::name if -f $_ &amp;amp;&amp;amp; -M _ &amp;lt;= 6/24},@ARGV)' /path</description>
      <pubDate>Thu, 01 May 2008 09:46:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190148#M323586</guid>
      <dc:creator>Jeeshan</dc:creator>
      <dc:date>2008-05-01T09:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Finding files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190149#M323587</link>
      <description>Dear all&lt;BR /&gt;        I'll give you a better picture of my problem.&lt;BR /&gt;I'm exporting the oracle DB every two hours. I want to keep only the last two or three backups,rest of the files should be removed. I'm using a script to automate this process, in witch I'm using mtime option to find the files. So, system keeps 12 copies of backup files and rest of the files are removed. &lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 01 May 2008 10:12:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190149#M323587</guid>
      <dc:creator>akarayil</dc:creator>
      <dc:date>2008-05-01T10:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Finding files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190150#M323588</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You could use something like below:&lt;BR /&gt;&lt;BR /&gt;find /path -exec ls -lrt {} +|head -3|xargs -i ls {}&lt;BR /&gt;&lt;BR /&gt;If you have 12 files left while running the script and you want to keep 3 files from that then you have to change the head -3 to head -9 &lt;BR /&gt;&lt;BR /&gt;find /path -exec ls -lrt {} +|head -3|xargs -i rm {}&lt;BR /&gt;&lt;BR /&gt;Just fine tune your current script using head command. Try with ls first and once you are satisfied replace it with rm.&lt;BR /&gt;&lt;BR /&gt;You can also play with ls -lt and tail instead of ls-lrt and head.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Rasheed Tamton.</description>
      <pubDate>Thu, 01 May 2008 10:54:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190150#M323588</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2008-05-01T10:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Finding files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190151#M323589</link>
      <description>&amp;gt; In Linux, there is an option mmin, that&lt;BR /&gt;&amp;gt; works fine. This is not working in HPUX.&lt;BR /&gt;&lt;BR /&gt;It might work if you used GNU "find".&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/findutils/" target="_blank"&gt;http://www.gnu.org/software/findutils/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You need something better than the PA-RISC&lt;BR /&gt;bundled C compiler to build it, but GCC can&lt;BR /&gt;do it, or you could probably find a pre-built&lt;BR /&gt;depot in the usual places.&lt;BR /&gt;&lt;BR /&gt;dy # gfind --version&lt;BR /&gt;GNU find version 4.2.33&lt;BR /&gt;Built using GNU gnulib version 8e128ebf42e16c8631f971a68f188c30962818be&lt;BR /&gt;Features enabled: O_NOFOLLOW(enabled) LEAF_OPTIMISATION&lt;BR /&gt;&lt;BR /&gt;dy # gfind . -mmin 5&lt;BR /&gt;./lib&lt;BR /&gt;./lib/regexprops&lt;BR /&gt;&lt;BR /&gt;dy # uname -a&lt;BR /&gt;HP-UX dy B.11.11 U 9000/785 2012616114 unlimited-user license&lt;BR /&gt;&lt;BR /&gt;The same holds true for most Linux tools,&lt;BR /&gt;which are, in fact, GNU tools (running on&lt;BR /&gt;GNU/Linux).</description>
      <pubDate>Thu, 01 May 2008 13:25:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190151#M323589</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-05-01T13:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Finding files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190152#M323590</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If you want to delete all, except two (or three) backups, you can run the following in the directory where your exports are located:&lt;BR /&gt;&lt;BR /&gt;ls -1t export* | awk 'NR&amp;gt;2 {system("rm " $1)}'&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Thu, 01 May 2008 15:41:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190152#M323590</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2008-05-01T15:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Finding files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190153#M323591</link>
      <description>I thank all of you.&lt;BR /&gt;I got the solution from Mr.Rasheed's suggestion. I implemented the same.&lt;BR /&gt;&lt;BR /&gt;Once again, Thank you very much.&lt;BR /&gt;&lt;BR /&gt;with best regards&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 02 May 2008 09:30:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-files/m-p/4190153#M323591</guid>
      <dc:creator>akarayil</dc:creator>
      <dc:date>2008-05-02T09:30:23Z</dc:date>
    </item>
  </channel>
</rss>

