<?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: cron to copy and keep it for 1 day in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312473#M875877</link>
    <description>hi,&lt;BR /&gt;&lt;BR /&gt;could u just perform the purging by replace "ls -ld" with rm without using cron for now, i.e.:&lt;BR /&gt;&lt;BR /&gt;# find /oracle/TRP/saparchlocal -name '*arch*dbf' -atime +0 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;regards.</description>
    <pubDate>Tue, 22 Jun 2004 21:49:25 GMT</pubDate>
    <dc:creator>Joseph Loo</dc:creator>
    <dc:date>2004-06-22T21:49:25Z</dc:date>
    <item>
      <title>cron to copy and keep it for 1 day</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312470#M875874</link>
      <description>I am doing some cron job to copy the oracle arch log file from saparch to saparchlocal just for archiving purpose.  I  need to purge the saparchlocal if the file is older than 1 day but it doesn't seem to purge for any file older than 1 day.&lt;BR /&gt;&lt;BR /&gt;00,15,30,45 * * * * find /oracle/TRP/saparch -name '*arch*dbf' -newer /oracle/TRP/saparchlocal -print -exec cp -p {} /oracle/TRP/saparchlocal \;&lt;BR /&gt;00,15,30,45 * * * * find /oracle/TRP/saparch -name 'archTRP.log' -newer /oracle/TRP/saparchlocal/archTRP.log -print -exec cp -p {} /oracle/TRP/saparchlocal \;&lt;BR /&gt;0 3,12,20 * * * find /oracle/TRP/saparchlocal -name '*arch*dbf' -mtime +0 -print -exec rm {} \;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jun 2004 20:33:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312470#M875874</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2004-06-22T20:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: cron to copy and keep it for 1 day</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312471#M875875</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;if u try the following:&lt;BR /&gt;&lt;BR /&gt;# find /oracle/TRP/saparchlocal -name '*arch*dbf' -mtime +0 -print -exec ls -ld {} \;&lt;BR /&gt;or &lt;BR /&gt;# find /oracle/TRP/saparchlocal -name '*arch*dbf' -atime +0 -exec ls -ld {} \;&lt;BR /&gt;&lt;BR /&gt;r there any listing of the archive logs.&lt;BR /&gt;&lt;BR /&gt;just for info, i have no problem using -atime to remove the archive log from my server.&lt;BR /&gt;&lt;BR /&gt;regards.</description>
      <pubDate>Tue, 22 Jun 2004 20:46:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312471#M875875</guid>
      <dc:creator>Joseph Loo</dc:creator>
      <dc:date>2004-06-22T20:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: cron to copy and keep it for 1 day</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312472#M875876</link>
      <description>It give the following output&lt;BR /&gt;&lt;BR /&gt;find /oracle/TRP/saparchlocal -name '*arch*dbf' -mtime +0 -print -exec ls -ld {} \;&lt;BR /&gt;/oracle/TRP/saparchlocal/TRParch1_2413.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 04:31 /oracle/TRP/saparchlocal/TRParch1_2413.dbf&lt;BR /&gt;/oracle/TRP/saparchlocal/TRParch1_2414.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 07:31 /oracle/TRP/saparchlocal/TRParch1_2414.dbf&lt;BR /&gt;/oracle/TRP/saparchlocal/TRParch1_2415.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 07:34 /oracle/TRP/saparchlocal/TRParch1_2415.dbf&lt;BR /&gt;/oracle/TRP/saparchlocal/TRParch1_2416.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 07:37 /oracle/TRP/saparchlocal/TRParch1_2416.dbf&lt;BR /&gt;/oracle/TRP/saparchlocal/TRParch1_2417.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 09:11 /oracle/TRP/saparchlocal/TRParch1_2417.dbf&lt;BR /&gt;/oracle/TRP/saparchlocal/TRParch1_2418.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 10:06 /oracle/TRP/saparchlocal/TRParch1_2418.dbf&lt;BR /&gt;&lt;BR /&gt;find /oracle/TRP/saparchlocal -name '*arch*dbf' -atime +0 -exec ls -ld {} \;&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 04:31 /oracle/TRP/saparchlocal/TRParch1_2413.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 07:31 /oracle/TRP/saparchlocal/TRParch1_2414.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 07:34 /oracle/TRP/saparchlocal/TRParch1_2415.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 07:37 /oracle/TRP/saparchlocal/TRParch1_2416.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 09:11 /oracle/TRP/saparchlocal/TRParch1_2417.dbf&lt;BR /&gt;-rw-rw----   1 oratrp     dba        41944064 Jun 22 10:06 /oracle/TRP/saparchlocal/TRParch1_2418.dbf&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jun 2004 21:19:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312472#M875876</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2004-06-22T21:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: cron to copy and keep it for 1 day</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312473#M875877</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;could u just perform the purging by replace "ls -ld" with rm without using cron for now, i.e.:&lt;BR /&gt;&lt;BR /&gt;# find /oracle/TRP/saparchlocal -name '*arch*dbf' -atime +0 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;regards.</description>
      <pubDate>Tue, 22 Jun 2004 21:49:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312473#M875877</guid>
      <dc:creator>Joseph Loo</dc:creator>
      <dc:date>2004-06-22T21:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: cron to copy and keep it for 1 day</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312474#M875878</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Why you are trying to copy the archive log files.&lt;BR /&gt;&lt;BR /&gt;IF you need such a scneario then you can add a parameter in the Oracle database initialization file.&lt;BR /&gt;LOG_ARCHIVE_DUPLEX_DEST &lt;BR /&gt;&lt;BR /&gt;Then you can remove those files from the specified directory using a script.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jun 2004 22:18:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312474#M875878</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2004-06-22T22:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: cron to copy and keep it for 1 day</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312475#M875879</link>
      <description>According to my dba they say that doesn't work</description>
      <pubDate>Tue, 22 Jun 2004 22:34:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312475#M875879</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2004-06-22T22:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: cron to copy and keep it for 1 day</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312476#M875880</link>
      <description>L.S.&lt;BR /&gt;&lt;BR /&gt;Did you try Joseph's suggestion to remove the files with the same command from the commandline, so not using cron? Result?&lt;BR /&gt;&lt;BR /&gt;Some other suggestions:&lt;BR /&gt;* Do you receive any emails from cron jobs failing? &lt;BR /&gt;&lt;BR /&gt;* Whose cron job is it? Whose directory is it, what are the permissions on the directory?&lt;BR /&gt;&lt;BR /&gt;* Can you try rm -f in stead of rm?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JP.</description>
      <pubDate>Wed, 23 Jun 2004 00:57:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312476#M875880</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2004-06-23T00:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: cron to copy and keep it for 1 day</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312477#M875881</link>
      <description>Hi kholikt,&lt;BR /&gt;&lt;BR /&gt;you could try first to make sure that there are files to delete,  e.g. by this command:&lt;BR /&gt;# find /oracle/TRP/saparchlocal -name '*arch*dbf' -mtime +0 -print -exec ls -ltr {} \;&lt;BR /&gt;&lt;BR /&gt;If no file appears then try this:&lt;BR /&gt;# set -x&lt;BR /&gt;and execute the command again in order to see how the wildcards expand: perhaps they do not match anything. &lt;BR /&gt;&lt;BR /&gt;It would also be a good idea to redirect the output from the cron commands to specific files. If not, the output from the cron commands goes to the mail for the user in whose crontab the commands are executed - hence Jeroen's suggestion.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jun 2004 02:35:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-to-copy-and-keep-it-for-1-day/m-p/3312477#M875881</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2004-06-23T02:35:55Z</dc:date>
    </item>
  </channel>
</rss>

