Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rcp retain owner

Status
Not open for further replies.

craig322

MIS
Apr 19, 2001
108
US
Is there a way to copy files from one unix server to another and retain the owners. I have used the rcp -pr and am able to retain dates and permissions, but the owner is coming across as the person who is doing the rcp.

TIA
 
i do not use the r-cmds since a lot of years,
supposed on the remote sys the user is known, the option '-r'
should work. if not, the simpliest way to do it, without using ch[mod|own] is:

tar cfv file2send <the files to copy>
transfert ftp|ssh|rcp file2send
and untar this file

rsh host tar xfv file2send
------------ jamisar
Einfachheit ist das Resultat der Reife. (Friedrich Schiller)
Simplicity is the fruit of maturity.
 
sorry:

xvfp file2send
p = preserve uid...
------------ jamisar
Einfachheit ist das Resultat der Reife. (Friedrich Schiller)
Simplicity is the fruit of maturity.
 
Hi
You'll have to get the owner (ls -l and cut -c16-24)
then rcp -pr User@Host:Directory.
Least, that's what I'd do - unless someone knows better !
;-) Dickie Bird
db@dickiebird.freeserve.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top