This would find anything in or below dst that is owned by the root user or group (these would be new files added by rsync at the destination), and changes the owner and group of these to B. (note that -r is implied by -a/ -archive), and then find dst -user root -exec chown B + It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the set of files to be copied. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon. This could be done through rsync -a -no-group -no-user src/ dst Description Rsync is a fast and extraordinarily versatile file copying tool. You can also start the terminal with su and then make commands from there. 407 2 2 gold badges 5 5 silver badges 16 16 bronze badges. This way you will be prompted to enter your password (once you are allowed to execute commands as super user). If you want to preserve the ownerships of the existing files on the destination side, then the easiest way to do that is to use both -no-group and -no-user and then post-process the destination files and directories in such a way that anything that is owned by root gets owned by the other user. How do I run the latest version of rsync as root when accessing my phone from a remote host ssh rsync Share. Is empty, a leading colon must be supplied. The above commands will make the file executable and will launch the executable with root-level permissions. GROUP is empty, the trailing colon may be omitted, but if USER You need to do two things both from a Terminal prompt: Change to the directory where you have the. Is empty, no mapping for the omitted user/group will occur. This option forces all files to be owned by USER with group
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |