![]() To test whether the rsync has been done right we can check the permission of files in a folder in the source destination using the following command: ls -al This will synchronize the two folders or files and will also maintain the same timestamp as that of the source. To preserve the above-mentioned permissions, ownership, and timestamp we can use the following command: rsync -avz source destination To transfer a file or folder from source to destination using rsync, we use the format: rsync source destination ‘rsync -a’ option preserves the permissions, ownership, timestamp of files and folders that are to be transferred using rsync. D, -devices -specials Preserve devices (super-user only) +files o, -owner Preserve owner (super-user only) We can also use -a flag (–archive), which is an aggregation of -p and several other useful ones.Īrchive mode consists of the following flags: -r, -recursive recurse into directories ![]() ![]() In order to preserve permissions, we will use -p flag (–perms).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |