Re: Maintaining ownership of files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Todd Cary wrote:
> When I do
> 
>  scp -rp * 192.168.0.12://mydir
> 
> as root, all of the files and sub-files are owned by root.  I would like
> to have them keep their original owners (and groups).
> 
> Can this be done?
> 
> Todd
> 

I always use rsync for purposes like this, using rsync for the above
command would be:

rsync -a -e ssh * 192.168.0.12:/mydir

Actually not sure about the "*", I always use the path to the directory
to copy and if I want the contents of the directory then end the path
with a "/".  See man page for rsync for all the options to rsync.

Mike

-- 
Mike Noble
mgnoble@xxxxxxxxx
Key ID: 0xFFDFC13B
Keyserver: http://pgpkeys.mit.edu


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux