<?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: rcp or ftp script ?? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526103#M24367</link>
    <description>Ok Richard, now that I see your full question:&lt;BR /&gt;&lt;BR /&gt;Something like this:&lt;BR /&gt;FILES="/tmp/file1 /home/richard/file2"&lt;BR /&gt;REMOTES="huey louie dewey"&lt;BR /&gt;for FILE in ${FILES}&lt;BR /&gt;  do&lt;BR /&gt;     for REMOTE in ${REMOTES}&lt;BR /&gt;       do&lt;BR /&gt;         rcp -p ${FILE} ${REMOTE}:${FILE}&lt;BR /&gt;       done&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;That will do it. You will need to set up host.equiv's and .rhosts but that's it.&lt;BR /&gt;&lt;BR /&gt;Clay&lt;BR /&gt;</description>
    <pubDate>Tue, 08 May 2001 21:32:34 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2001-05-08T21:32:34Z</dc:date>
    <item>
      <title>rcp or ftp script ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526100#M24364</link>
      <description>I have a file on one box and i want to write a script that will put it in several boxes.&lt;BR /&gt;what would be best? to rcp or ftp?&lt;BR /&gt;If i rcp how do I rcpt the file for this box to the others? The same with ftp. what do you recommend and why .&lt;BR /&gt;thanks..&lt;BR /&gt;Richard&lt;BR /&gt;</description>
      <pubDate>Tue, 08 May 2001 21:21:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526100#M24364</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-05-08T21:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: rcp or ftp script ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526101#M24365</link>
      <description>This: with typos&lt;BR /&gt;If i rcp how do I rcpt the file for this box to the others? The same with ftp. &lt;BR /&gt;should be : without typos&lt;BR /&gt;If I rcp how do I rcp the file form this box to the others? The same with ftp. &lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 08 May 2001 21:24:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526101#M24365</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-05-08T21:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: rcp or ftp script ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526102#M24366</link>
      <description>As long as your within the UNIX world and not having to send the file to those pesky PC's I would use rcp simply because it is much easier to script and you can also specify permissions&lt;BR /&gt;wvia -p argument.&lt;BR /&gt;&lt;BR /&gt;My 2 cents, Clay&lt;BR /&gt;</description>
      <pubDate>Tue, 08 May 2001 21:26:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526102#M24366</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-08T21:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: rcp or ftp script ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526103#M24367</link>
      <description>Ok Richard, now that I see your full question:&lt;BR /&gt;&lt;BR /&gt;Something like this:&lt;BR /&gt;FILES="/tmp/file1 /home/richard/file2"&lt;BR /&gt;REMOTES="huey louie dewey"&lt;BR /&gt;for FILE in ${FILES}&lt;BR /&gt;  do&lt;BR /&gt;     for REMOTE in ${REMOTES}&lt;BR /&gt;       do&lt;BR /&gt;         rcp -p ${FILE} ${REMOTE}:${FILE}&lt;BR /&gt;       done&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;That will do it. You will need to set up host.equiv's and .rhosts but that's it.&lt;BR /&gt;&lt;BR /&gt;Clay&lt;BR /&gt;</description>
      <pubDate>Tue, 08 May 2001 21:32:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526103#M24367</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-08T21:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: rcp or ftp script ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526104#M24368</link>
      <description>Hi Richard:&lt;BR /&gt;&lt;BR /&gt;'rcp' has an advantage over 'ftp' that can be very useful, namely the timestamps and permissions of files can be maintained by using the '-p' option.  With 'ftp' this only occurs if an existing file of the same name exists (empty or not).&lt;BR /&gt;&lt;BR /&gt;'rcp' is a remote 'cp' and so has the recursive copy features which can be harder to handle in scripted ftp sessions.&lt;BR /&gt;&lt;BR /&gt;However, 'ftp' is genearally implemented on all operating systems.  'rcp' is a unix-to-unix tool.&lt;BR /&gt;&lt;BR /&gt;Therefore, the choice is really yours, depending upon the task, its complexity, and the availability of 'rcp' on the sending and receiving ends.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 08 May 2001 21:33:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526104#M24368</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-05-08T21:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: rcp or ftp script ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526105#M24369</link>
      <description>Hi Richard,&lt;BR /&gt;one more option is rdist.&lt;BR /&gt;Have a look in the man pages, it's quite similar to rcp.&lt;BR /&gt;good luck,&lt;BR /&gt;Thierry.</description>
      <pubDate>Wed, 09 May 2001 05:37:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526105#M24369</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2001-05-09T05:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: rcp or ftp script ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526106#M24370</link>
      <description>Thanks everyone .. one quick question A.Clay&lt;BR /&gt;the script you gave me worked fine. &lt;BR /&gt;But if I want to put one file form one dir to a differnt dir in the other box how would i write that?</description>
      <pubDate>Wed, 09 May 2001 13:38:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526106#M24370</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-05-09T13:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: rcp or ftp script ??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526107#M24371</link>
      <description>Hi Richard:&lt;BR /&gt;It's easy. The answer is just like you would with plain old cp.&lt;BR /&gt;&lt;BR /&gt;e.g. rcp -p /tmp/file1 remote_host:/tmp2/file1&lt;BR /&gt;or&lt;BR /&gt;rcp -p /tmp/file1 remote_host:/tmp2/file2&lt;BR /&gt;&lt;BR /&gt;BTW you can reverse the sense of the arguments&lt;BR /&gt;and copy from the remote host, if you wish.&lt;BR /&gt;&lt;BR /&gt;e.g. rcp -p remote_host:/tmp2/file1 /tmp/file1&lt;BR /&gt;&lt;BR /&gt;Finally if you want to specify full paths on the source like my example and different destination directories then you should use 'basename' and 'dirname'. Man basename and dirname for details.&lt;BR /&gt;&lt;BR /&gt;Clay&lt;BR /&gt;</description>
      <pubDate>Wed, 09 May 2001 13:48:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rcp-or-ftp-script/m-p/2526107#M24371</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-09T13:48:02Z</dc:date>
    </item>
  </channel>
</rss>

