Installed below. (It seems that dnf has become the standard for installation from CentOS 8)
command
dnf -y install rsync
After the installation is complete, check the version below.
command
rsync --version
Command to copy the "/from/test1.txt" file to the "/ to /" folder. However, ** only the operation check ** is done without actually copying.
command
rsync -vn /from/test1.txt /to/
v
= Show rsync behavior on your terminal Optional n
= Do not actually do the processing, just rehearse option (dry run)The result looks like this. (File is not copied) Before you get used to it, you should add `` `-vn```.
command
rsync -help
result… (The total is about twice as much as this image ...)
I want to make the contents of the "/ to" folder the same as "/ from"! That option.
command
rsync -acv --delete /from/ /to/
a
= Copy while maintaining file ownership, creation date, etc., and process subfolders recursively Option (Archive) c
= Do not judge whether to copy by comparing the checksum, not the file size or modification date. Option Delete
= Do not delete files and folders that are not in the copy source from the copy destination OptionWhen synchronizing folders, be careful not to forget to add "/" at the end of the copy source file path. If you do not add it, a "/ to/from" folder will be created and copied into it ...
I checked using Docker Desktop this time as well.
https://www.server-world.info/query?os=CentOS_8&p=rsync https://www.atmarkit.co.jp/ait/articles/1702/02/news031.html
Windows10 Pro version 1909 OS build 19042.685 Docker Desktop:3.0.0(50684) Engine:20.10.10 Compose:1.27.4 CentOS Linux release 8.2.2004 (Core) rsync version 3.1.3 protocol version 31
Recommended Posts