<?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: find command in crontab in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232493#M468614</link>
    <description>Nope still does not not.&lt;BR /&gt;I see it run in the cron log. So cron does run, but have tried multiple ways.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;05 10 * * * find /home/oracle/scripts/logs -name "*acdb_online_backup_level*" -mtime -1 -exec rm -rf {} + 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;05 10 * * * find /home/oracle/scripts/logs -name "*acdb_archivelog_backup*" -mtime -1 -exec rm -rf {} + 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;15 10 * * * find "/home/oracle/scripts/logs/*acdb_archivelog_backup*" -mtime -1 -exec rm -rf {} + 2&amp;gt;/dev/null</description>
    <pubDate>Mon, 29 Mar 2010 14:19:21 GMT</pubDate>
    <dc:creator>Ratzie</dc:creator>
    <dc:date>2010-03-29T14:19:21Z</dc:date>
    <item>
      <title>find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232490#M468611</link>
      <description>I need to run a find command inside the crontab.&lt;BR /&gt;For some reason this does not work...&lt;BR /&gt;&lt;BR /&gt;00 11 * * * find /home/oracle/scripts/logs/*acdb_online_backup_level* -mtime -14 -exec rm -rf {} + 2&amp;gt;/dev/null</description>
      <pubDate>Mon, 29 Mar 2010 12:35:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232490#M468611</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2010-03-29T12:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232491#M468612</link>
      <description>Doesn't work how?  find(1) should be in your limited cron path.&lt;BR /&gt;&lt;BR /&gt;I don't see any special "%" chars.&lt;BR /&gt;What HP-UX version are you using?</description>
      <pubDate>Mon, 29 Mar 2010 12:44:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232491#M468612</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-03-29T12:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232492#M468613</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Whenever you use shell wildcards (metacharacters) with a 'find' command, you should quote the argument to avoid interpretation by the shell.  Too, your 'cron' environment is very likely to differ from your normal login one.  Try:&lt;BR /&gt;&lt;BR /&gt;# 00 11 * * * find "/home/oracle/scripts /logs/*acdb_online_backup_level*" -mtime -14 -exec rm -rf {} + 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;That said, I really think you want to do:&lt;BR /&gt;&lt;BR /&gt;# 00 11 * * * find /home/oracle/scripts/logs -name "*acdb_online_backup_level*" -mtime -14 -exec rm -rf {} + 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 29 Mar 2010 12:44:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232492#M468613</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-29T12:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232493#M468614</link>
      <description>Nope still does not not.&lt;BR /&gt;I see it run in the cron log. So cron does run, but have tried multiple ways.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;05 10 * * * find /home/oracle/scripts/logs -name "*acdb_online_backup_level*" -mtime -1 -exec rm -rf {} + 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;05 10 * * * find /home/oracle/scripts/logs -name "*acdb_archivelog_backup*" -mtime -1 -exec rm -rf {} + 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;15 10 * * * find "/home/oracle/scripts/logs/*acdb_archivelog_backup*" -mtime -1 -exec rm -rf {} + 2&amp;gt;/dev/null</description>
      <pubDate>Mon, 29 Mar 2010 14:19:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232493#M468614</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2010-03-29T14:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232494#M468615</link>
      <description>Does this work from the command line?&lt;BR /&gt;&lt;BR /&gt;I would modify the script so that it e-mails you error rather than just sending them to /dev/null.  &lt;BR /&gt;&lt;BR /&gt;find "/home/oracle/scripts/logs/*acdb_archivelog_backup*" -mtime -1 -exec rm -rf {} + 2&amp;gt;&amp;amp;1 | mailx -s "find output" you@someaddress.com</description>
      <pubDate>Mon, 29 Mar 2010 14:32:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232494#M468615</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2010-03-29T14:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232495#M468616</link>
      <description>Shouldn't...&lt;BR /&gt;-rf {} + 2&amp;gt;&amp;amp;1 |&lt;BR /&gt;be...&lt;BR /&gt;-rf {} \;</description>
      <pubDate>Mon, 29 Mar 2010 15:53:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232495#M468616</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2010-03-29T15:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232496#M468617</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Michael: Shouldn't... -rf {} + 2&amp;gt;&amp;amp;1 | be...&lt;BR /&gt;-rf {} \;&lt;BR /&gt;&lt;BR /&gt;No.  Using the '+' terminator with '-exec' greatly improves performance.  Multiple arguments are collected and passed to each process spawned.  This acts much like a pipeline to 'xargs' would and has been available since 11.0.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 29 Mar 2010 16:01:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232496#M468617</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-29T16:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232497#M468618</link>
      <description>I can run:&lt;BR /&gt;find /home/oracle/scripts/logs/*acdb_online_backup_level*.log&lt;BR /&gt;&lt;BR /&gt;But once I add the -mtime -1 or any number, I get nothing.&lt;BR /&gt;&lt;BR /&gt;Exactly the same thing if I run it like:&lt;BR /&gt;find /home/oracle/scripts/logs -name "*acdb_online_backup_level*.log"&lt;BR /&gt;-get results&lt;BR /&gt;&lt;BR /&gt;find /home/oracle/scripts/logs -name "*acdb_online_backup_level*.log" -mtime -5&lt;BR /&gt;-No results</description>
      <pubDate>Mon, 29 Mar 2010 16:42:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232497#M468618</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2010-03-29T16:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232498#M468619</link>
      <description>I am the dummy here...&lt;BR /&gt;mtime +5!  Not -5&lt;BR /&gt;&lt;BR /&gt;Arggg!</description>
      <pubDate>Mon, 29 Mar 2010 16:45:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232498#M468619</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2010-03-29T16:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232499#M468620</link>
      <description>Thank you James.</description>
      <pubDate>Mon, 29 Mar 2010 16:59:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232499#M468620</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2010-03-29T16:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: find command in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232500#M468621</link>
      <description>&amp;gt;JRF: Whenever you use shell wildcards (metacharacters) with a 'find' command, you should quote the argument to avoid interpretation by the shell.&lt;BR /&gt;&lt;BR /&gt;That's only if they are in -name or -path.  Where they were was fine and needed to be expanded.&lt;BR /&gt;(That's why I asked "Doesn't work how?".)</description>
      <pubDate>Tue, 30 Mar 2010 00:30:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-in-crontab/m-p/5232500#M468621</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-03-30T00:30:33Z</dc:date>
    </item>
  </channel>
</rss>

