How can I copy files and directories from one user to another user on a unix system so that the file permissions don't change? The recipient is not the owner, but I have root permissions.
Thanks.
|
How can I copy files and directories from one user to another user on a unix system so that the file permissions don't change? The recipient is not the owner, but I have root permissions. Thanks. | ||||
|
show 2 more comments
feedback
|
This question came from our site for professional and enthusiast programmers.
|
The POSIX 'cp' command provides ' The other way of doing it, which can be beneficial, is to use You'll need to check that your machine's copy of
And with
Note that ' | |||
|
feedback
|
cp -a <src> <dst>... Cody is right, this belongs in another forum unless you are using a programming language. Judging from the question, I think this is just a basic file copy operation... Not programming. – Mike Pennington Apr 16 '11 at 12:35