Local
copy file
rsync -avz /etc/hosts /tmp
rsync -zrtopg /etc/hosts /tmp
# 工作中rsync的两种常用选项,复制hosts到/tmp目录delete directory
mkdir /null
rsync -r --delete /null/ /tmp
# 使用rsync清空/tmp目录delete file content
touch /null.txt
rsync -r --delete /null.txt /etc/hosts
# 使用rsync命令清空hosts文件list file & directory attributes
rsync FILELast updated