- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: rcp keeping permisions
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
Discussions
Discussions
Forums
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
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
тАО06-06-2006 04:29 AM
тАО06-06-2006 04:29 AM
how to copy directories/files from one host to another keeping the original owner&permissions on the destination host?
Thanks and regards,
Juan.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 04:33 AM
тАО06-06-2006 04:33 AM
Re: rcp keeping permisions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 04:34 AM
тАО06-06-2006 04:34 AM
Re: rcp keeping permisions
Its same like cp
rcp -p -r /etc server2:/tmp
be careful if ur copying in /etc of server2 it will overwrite without warning
Cheers
Arunkumar.B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 04:35 AM
тАО06-06-2006 04:35 AM
Re: rcp keeping permisions
You can use rcp -p option to preserve permission.
-p The -p option causes rcp to attempt to preserve (duplicate) in its
copies the modification times and modes of the source files, ignor-
ing the umask. By default, the mode and owner of file2 are pre-
served if it already existed; otherwise the mode of the source file
modified by the umask(2) on the destination host is used.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 04:43 AM
тАО06-06-2006 04:43 AM
Re: rcp keeping permisions
If you want to preserve all attributes then you should use a different mechanism (cpio; tar; or follow each copy with explicit commands).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 04:47 AM
тАО06-06-2006 04:47 AM
Re: rcp keeping permisions
As usual, the manpages offer you the quickest, and often most complete, answer :-)
http://docs.hp.com/en/B2355-60127/rcp.1.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 09:53 AM
тАО06-06-2006 09:53 AM
Solutionfrom source server:
cd /sourcedir
tar cvf - . | remsh destination_server "cd /destdir ; tar xvf - "
Better yet, through ssh (similar)
from source server:
cd /sourcedir
tar cvf - . | ssh destination_server "cd /destdir ; tar xvf - "
If you're on Linux, you can compress across the pipe easily...
cd /sourcedir
tar cvzf - . | ssh destination_server "cd /destdir ; tar xvzf - "
If you're on HPUX and you want to compress across the pipe...
cd /sourcedir
tar cvf - . | compress | ssh destination_server "cd /destdir ; uncompress | tar xvf - "
Your results with compression probably will vary, some things will be faster using it, while others wont. The big thing here is, using tar you will preserve your file ownerships, permissions, etc.
ONE MORE caveat - if you are sending over special files (e.g. device files), you'll need to use cpio, or perhaps gnu tar instead of HPUX tar.