How to use cp command without to overwrite target file permissions
for example
cp /tmp/file /home/file
I dont want to change chown and chgrp on /home/file
|
How to use cp command without to overwrite target file permissions for example
I dont want to change chown and chgrp on /home/file |
||||
|
|
If you've only opened the manual for The next will not overwrite the file permissions and ownership + groupship:
Note that root privileges are needed if you want to preserve the ownership and groupship. An excerpt from the manual:
|
|||
|
|
|
Or you can use even better install program from GNU coreutils that has been made for this particular purpose. Please note it is not able to recurse (no -R or -r option). http://www.gnu.org/software/coreutils/manual/html_node/install-invocation.html |
|||
|
|