- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How can I overwrite directory using rcp
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
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
12-22-2004 08:56 PM
12-22-2004 08:56 PM
How can I overwrite directory using rcp
By using RCP to remote copy files, I can only overwrite existing files, but not existing folders, how can I do the latter?
Is there any other option I can use?
Please advise!
Merry Xmas
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2004 09:06 PM
12-22-2004 09:06 PM
Re: How can I overwrite directory using rcp
you are confused. rcp COPIES files from one location to another, and if the -r option is used, then it recursively walks sub directories and copies those files. It WILL NOT copy directory headers thus it will not automatically remove files that aren't being copied.
What you are asking is to have rcp delete the destination first then copy the files.
To do this:
remsh DESThost rm -rf DESTdirectory
rcp -rp LOCALdirectory DESThost:DESTdirectory
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2004 10:11 PM
12-22-2004 10:11 PM
Re: How can I overwrite directory using rcp
Thanks for the tips. In this case is there any other way to achieve this? You see, I need to copy a whole bunch of directories to a remote box for backup and I will have to overwrite those directories that has been modified, so am trying to look for an easy way to go around this..
regards
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2004 10:44 PM
12-22-2004 10:44 PM
Re: How can I overwrite directory using rcp
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2004 10:46 PM
12-22-2004 10:46 PM
Re: How can I overwrite directory using rcp
take a tar . copy it to another server. untar it.
regds,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2004 10:56 PM
12-22-2004 10:56 PM
Re: How can I overwrite directory using rcp
He wants to keep the directories in sync, thus if the destination directory has a file in it that is not on the source, then he wants that file deleted from the destination. Therefore tar'ing and untar'ing aren't going to achieve that, thus he has to either just keep the tar archive at the destination or perform a delete.
live free or die
harry d brown jr