<?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: Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851576#M867390</link>
    <description>Hi Indira,&lt;BR /&gt;&lt;BR /&gt;compile c programme with:&lt;BR /&gt;cc -o fage fage.c&lt;BR /&gt;&lt;BR /&gt;it should be 7200 instead of 3600.&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
    <pubDate>Thu, 04 Dec 2003 11:15:43 GMT</pubDate>
    <dc:creator>Michael Schulte zur Sur</dc:creator>
    <dc:date>2003-12-04T11:15:43Z</dc:date>
    <item>
      <title>Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851567#M867381</link>
      <description>I need to remote copy files that are older than 2 hours. Can some one provide me the script. I tried using the -newer oftion with the find but could not succeed.&lt;BR /&gt;&lt;BR /&gt;On server S1 in direcotry D1 the files get generated every 10 minutes. I need to remotely copy all the files older than 2 hours to the  server S2 into a directory D2.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Thu, 04 Dec 2003 00:22:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851567#M867381</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2003-12-04T00:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851568#M867382</link>
      <description>A start:&lt;BR /&gt;&lt;BR /&gt;find ${TmpDirList} -type f -mtime +${OLDEST}&lt;BR /&gt;&lt;BR /&gt;This snippet goes after files more than a certain number of days old.&lt;BR /&gt;&lt;BR /&gt;If you -mtime to -ctime 2 that will allow you to gather a list of files more than two hours old for processing.&lt;BR /&gt;&lt;BR /&gt;find ${TmpDirList} -type f -ctime 2&lt;BR /&gt;&lt;BR /&gt;The TmpDirList parameter is a list of directory to scan.&lt;BR /&gt;&lt;BR /&gt;use the -print command to make a list for further processing.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 04 Dec 2003 00:28:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851568#M867382</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-12-04T00:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851569#M867383</link>
      <description>Hi Steven, &lt;BR /&gt;&lt;BR /&gt;Thanks a lot for the quick reply. &lt;BR /&gt;&lt;BR /&gt;I tried as you suggested.&lt;BR /&gt;&lt;BR /&gt;Here is the directory listing.&lt;BR /&gt;&lt;BR /&gt;-rw-rw----   1 oracle     dba        8550969 Dec  4 06:39 arch4473_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        8592471 Dec  4 06:41 arch4474_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        8501743 Dec  4 06:51 arch4475_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        8837264 Dec  4 06:53 arch4476_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        5980036 Dec  4 07:00 arch4477_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        2074509 Dec  4 08:00 arch4478_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        8019762 Dec  4 09:00 arch4479_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        8892805 Dec  4 09:20 arch4480_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        9192857 Dec  4 09:46 arch4481_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        9218013 Dec  4 10:10 arch4482_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        9350541 Dec  4 10:40 arch4483_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        6750444 Dec  4 11:00 arch4484_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        9333897 Dec  4 11:33 arch4485_rprd.log.Z&lt;BR /&gt;-rw-rw----   1 oracle     dba        9514487 Dec  4 12:07 arch4486_rprd.log.Z&lt;BR /&gt;&lt;BR /&gt;I tried thisâ ¦â ¦â ¦â ¦â ¦â ¦&lt;BR /&gt;&lt;BR /&gt;find  &lt;DIRECOTORY_PATH&gt;  -type f â  ctime 2 â  print and  I did&lt;/DIRECOTORY_PATH&gt;</description>
      <pubDate>Thu, 04 Dec 2003 00:42:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851569#M867383</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2003-12-04T00:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851570#M867384</link>
      <description>The problem with mtime and ctime is that they are in days, not hours...&lt;BR /&gt;&lt;BR /&gt;What you need to to use find is by creating a temporary file with the correct mtime by using touch and then do the find with ! -newer &lt;TMPFILE&gt;&lt;BR /&gt;&lt;BR /&gt;It will look like this:&lt;BR /&gt;touch -t 200312040800 /tmp/tmpf&lt;BR /&gt;find . ! -newer /tmp/tmpf -print&lt;BR /&gt;rm /tmp/tmpf&lt;BR /&gt;&lt;BR /&gt;Biggest issue this will give is of course the creation of the tempfile, since you need to calculate the correct time value. Now this can be done easily with perl:&lt;BR /&gt;&lt;BR /&gt;#!/usr/local/bin/perl&lt;BR /&gt;use POSIX qw(strftime);&lt;BR /&gt;print strftime("%Y%m%d%H%M",time()-120);&lt;BR /&gt;&lt;/TMPFILE&gt;</description>
      <pubDate>Thu, 04 Dec 2003 01:32:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851570#M867384</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2003-12-04T01:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851571#M867385</link>
      <description>Hi Elmar,&lt;BR /&gt;&lt;BR /&gt;Thanks for the suggestion. Yes I ca list the file older that the time the temp file was created by tough -t ccyymmddhhmi.&lt;BR /&gt;&lt;BR /&gt;Now I tried to copy these files as&lt;BR /&gt;find &lt;DIRECOTYR_PATH&gt; -name '&lt;FILENAME&gt;' -newer temp_file -depth | cp -p &lt;DESTINATION&gt;.&lt;BR /&gt;&lt;BR /&gt;I cannot copy like this, as cp will require the source file name. &lt;BR /&gt;&lt;BR /&gt;Any suggestions, to cpoy the listed file along with the find command.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;/DESTINATION&gt;&lt;/FILENAME&gt;&lt;/DIRECOTYR_PATH&gt;</description>
      <pubDate>Thu, 04 Dec 2003 02:07:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851571#M867385</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2003-12-04T02:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851572#M867386</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Elmar solution is of course correct. For time calculation on hours, I've once found a clever tip on the forum :&lt;BR /&gt;&lt;BR /&gt;/homeHA/phelix&amp;gt; echo $TZ&lt;BR /&gt;MET-1METDST&lt;BR /&gt;/homeHA/phelix&amp;gt; date +'%Y%m%d%H%M'&lt;BR /&gt;200312040810 # --&amp;gt; 8 in the morning&lt;BR /&gt;/homeHA/phelix&amp;gt; TZ=MET+1METDST date +'%Y%m%d%H%M' # add 2 hours to MET-1&lt;BR /&gt;200312040610 # 2 hours earlier !!!&lt;BR /&gt;&lt;BR /&gt;So depending on your TZ value, just use :&lt;BR /&gt;&lt;BR /&gt;touch -t $(TZ=MET+1METDST date +'%Y%m%d%H%M')  /tmp/foo&lt;BR /&gt;find xxx ! -newer /tmp/foo -exec cp -p {} destination \;&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Thu, 04 Dec 2003 02:16:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851572#M867386</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2003-12-04T02:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851573#M867387</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;use:&lt;BR /&gt;find &lt;DIRECOTYR_PATH&gt; -name '&lt;FILENAME&gt;' -newer temp_file -depth -exec cp -p '{}' &lt;DESTINATION&gt; ';'&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;&lt;BR /&gt;&lt;/DESTINATION&gt;&lt;/FILENAME&gt;&lt;/DIRECOTYR_PATH&gt;</description>
      <pubDate>Thu, 04 Dec 2003 02:20:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851573#M867387</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-12-04T02:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851574#M867388</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;Thanks for your good replies. Jean the script works now. Thanks to all you replied.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Indira</description>
      <pubDate>Thu, 04 Dec 2003 02:25:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851574#M867388</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2003-12-04T02:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851575#M867389</link>
      <description>Hi Indira,&lt;BR /&gt;&lt;BR /&gt;I wonder whether Jeans solution with the TZ is supported? ;-) It has another drawback. You can use only that for full hour differences, right? Once I was looking for a solution for a problem just like this. Find is only able to count in days, so I wrote a small c programme which is in the attachment. This will allow you to specify seconds.&lt;BR /&gt;&lt;BR /&gt;Use:&lt;BR /&gt;# cat t10&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;find /tmp -name '*' -depth -exec ./t101 '{}' ';'&lt;BR /&gt;&lt;BR /&gt;# cat t101&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;./fage ${1} 3600 || echo cp -p ${1} "destination"&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Dec 2003 07:42:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851575#M867389</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-12-04T07:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851576#M867390</link>
      <description>Hi Indira,&lt;BR /&gt;&lt;BR /&gt;compile c programme with:&lt;BR /&gt;cc -o fage fage.c&lt;BR /&gt;&lt;BR /&gt;it should be 7200 instead of 3600.&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Dec 2003 11:15:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851576#M867390</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-12-04T11:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851577#M867391</link>
      <description>Michael Schulte asked if timezone tricks are limited to full hour increments.  You can actually set a timezone to single second increments!  It is documented in "man environ".&lt;BR /&gt;&lt;BR /&gt;  There are three different timezones in the /sbin/set_parms.d/10_timezone list which have 30 minute offsets from their neighbors.&lt;BR /&gt;&lt;BR /&gt;        Zname[1]=NST3:30NDT&lt;BR /&gt;        Zfull[1]="Newfoundland Standard/Daylight"&lt;BR /&gt;&lt;BR /&gt;        Zname[3]=SAT4:30&lt;BR /&gt;        Zfull[3]="Venezuela, Guyana, Surinam"&lt;BR /&gt;     &lt;BR /&gt;        Zname[2]=IST-5:30&lt;BR /&gt;        Zfull[2]="India"&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Dec 2003 18:57:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851577#M867391</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2003-12-04T18:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851578#M867392</link>
      <description>I like the suggestion about using find, and the suggestion about manipulating the TZ was very creative, but one thing which would quickly and efficiently do what you are describing is the rdist utility, available at &lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/rdist-6.1.5/," target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/rdist-6.1.5/,&lt;/A&gt; or &lt;A href="http://www.magnicomp.com/rdist/." target="_blank"&gt;http://www.magnicomp.com/rdist/.&lt;/A&gt;  &lt;BR /&gt;&lt;BR /&gt;When using RDIST, you can specify a directory.  Rdist then evaluates which, if any of the files in the source (local) directory are not present on the target (remote) directory and then copies them over.  RDIST is very simple to configure.  You can put the commands in control file, called a dist file, and then run rdist with the -f distfile switch in cron to get consistent results every time.&lt;BR /&gt;&lt;BR /&gt;Good Luck!</description>
      <pubDate>Fri, 05 Dec 2003 02:35:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851578#M867392</guid>
      <dc:creator>Jeromy Gregg</dc:creator>
      <dc:date>2003-12-05T02:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851579#M867393</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;yes, you are right. I know now!!&lt;BR /&gt;&lt;BR /&gt;be happey,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Dec 2003 09:03:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851579#M867393</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-12-06T09:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851580#M867394</link>
      <description>Closing this thread. The -newer parameter in find did the job.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Indira A</description>
      <pubDate>Sun, 29 Aug 2004 21:34:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/4851580#M867394</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2004-08-29T21:34:05Z</dc:date>
    </item>
  </channel>
</rss>

