HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- duplicates using rcp command
Operating System - HP-UX
1842067
Members
2250
Online
110186
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
03-15-2005 04:58 PM
03-15-2005 04:58 PM
Hi Guys,
I have written a script to loop copy a list of files:
"DIR1/file1
DIR1/DIR2/file2
DIR1/DIR2/DIR3/file3
DIR4/file4"
DIR4/DIR5/file5"
DIR4/DIR5/file6"
DIR4/DIR5/DIR6/file7"
remotely over to another box using rcp command.
"rcp -rp $Sourcepath root@$R_HOSTNAME:$remotepath"
however when the 1st loop is completed, it would have already copied everything over.. and the nex two loop will only create duplicates over at the other box...
Can I prevent the rcp from creating unecessary duplicates?
thank u..
I have written a script to loop copy a list of files:
"DIR1/file1
DIR1/DIR2/file2
DIR1/DIR2/DIR3/file3
DIR4/file4"
DIR4/DIR5/file5"
DIR4/DIR5/file6"
DIR4/DIR5/DIR6/file7"
remotely over to another box using rcp command.
"rcp -rp $Sourcepath root@$R_HOSTNAME:$remotepath"
however when the 1st loop is completed, it would have already copied everything over.. and the nex two loop will only create duplicates over at the other box...
Can I prevent the rcp from creating unecessary duplicates?
thank u..
Solved! Go to Solution.
- Tags:
- rcp
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2005 05:04 PM
03-15-2005 05:04 PM
Re: duplicates using rcp command
I don't quite understand what you mean about the 1st loop and "next two loop" though.
How exactly did you write your script? That would help us in troubleshooting.
Whatever method you use, duplicate files will not be created. It will merely overwrite what is already there.
How exactly did you write your script? That would help us in troubleshooting.
Whatever method you use, duplicate files will not be created. It will merely overwrite what is already there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2005 05:22 PM
03-15-2005 05:22 PM
Solution
I don't understand the question either, but I'm
guessing that you want to remote-copy the file only if
it does not exists in the remote machine. If that's the
case, do the following:
rexec $R_HOSTNAME -l root "ls $remotepath 2> /dev/null" | grep -q $remotepath
if [ $? -eq 1 ]
then
rcp -rp $Sourcepath root@$R_HOSTNAME:$remotepath
fi
- Biswajit
guessing that you want to remote-copy the file only if
it does not exists in the remote machine. If that's the
case, do the following:
rexec $R_HOSTNAME -l root "ls $remotepath 2> /dev/null" | grep -q $remotepath
if [ $? -eq 1 ]
then
rcp -rp $Sourcepath root@$R_HOSTNAME:$remotepath
fi
- Biswajit
:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2005 06:40 PM
03-15-2005 06:40 PM
Re: duplicates using rcp command
Hi Tripathy, that exactly the answer I need.. many many thanks.. i was creating a script to provide incremental backup for my box.. I have attached the script if u are interested to see my primitive codes..
Thanks Guys!!!
Thanks Guys!!!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP