- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- rcp or ftp script ??
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 02:21 PM
05-08-2001 02:21 PM
what would be best? to rcp or ftp?
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 .
thanks..
Richard
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 02:24 PM
05-08-2001 02:24 PM
Re: rcp or ftp script ??
If i rcp how do I rcpt the file for this box to the others? The same with ftp.
should be : without typos
If I rcp how do I rcp the file form this box to the others? The same with ftp.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 02:26 PM
05-08-2001 02:26 PM
Re: rcp or ftp script ??
wvia -p argument.
My 2 cents, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 02:32 PM
05-08-2001 02:32 PM
SolutionSomething like this:
FILES="/tmp/file1 /home/richard/file2"
REMOTES="huey louie dewey"
for FILE in ${FILES}
do
for REMOTE in ${REMOTES}
do
rcp -p ${FILE} ${REMOTE}:${FILE}
done
done
That will do it. You will need to set up host.equiv's and .rhosts but that's it.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 02:33 PM
05-08-2001 02:33 PM
Re: rcp or ftp script ??
'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).
'rcp' is a remote 'cp' and so has the recursive copy features which can be harder to handle in scripted ftp sessions.
However, 'ftp' is genearally implemented on all operating systems. 'rcp' is a unix-to-unix tool.
Therefore, the choice is really yours, depending upon the task, its complexity, and the availability of 'rcp' on the sending and receiving ends.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 10:37 PM
05-08-2001 10:37 PM
Re: rcp or ftp script ??
one more option is rdist.
Have a look in the man pages, it's quite similar to rcp.
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2001 06:38 AM
05-09-2001 06:38 AM
Re: rcp or ftp script ??
the script you gave me worked fine.
But if I want to put one file form one dir to a differnt dir in the other box how would i write that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2001 06:48 AM
05-09-2001 06:48 AM
Re: rcp or ftp script ??
It's easy. The answer is just like you would with plain old cp.
e.g. rcp -p /tmp/file1 remote_host:/tmp2/file1
or
rcp -p /tmp/file1 remote_host:/tmp2/file2
BTW you can reverse the sense of the arguments
and copy from the remote host, if you wish.
e.g. rcp -p remote_host:/tmp2/file1 /tmp/file1
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.
Clay