rsync的常用命令包括但不限于:
rsync -a source_dir destination_dir:以归档模式同步目录,保留文件属性和权限。
rsync -v source_dir destination_dir:输出详细的同步过程信息。
rsync -r source_dir destination_dir:递归同步目录及其子目录。
rsync -z source_dir destination_dir:启用压缩功能,减少数据传输量。
rsync --delete source_dir destination_dir:在目标目录中删除那些源目录中不存在的文件。
rsync --exclude='pattern' source_dir destination_dir:排除与指定模式匹配的文件或文件夹。
rsync --progress source_dir destination_dir:显示同步进度和速度信息。
rsync --bwlimit=KBPS source_dir destination_dir:限制带宽使用率,以KB/s为单位。
这些命令是rsync的基本和常用选项,可以根据具体需求进行组合使用。