shell同步目录

n1上更新了/opt/spark目录下面的内容,同步到n2,n3,n4上去

同步目录

rsync -varcl --exclude=logs /opt/spark /opt/spark-1.4.0-bin-cdh5.3.0 root@n2:/opt

rsync -varcl --exclude=logs /opt/spark /opt/spark-1.4.0-bin-cdh5.3.0 root@n3:/opt
rsync -varcl --exclude=logs /opt/spark /opt/spark-1.4.0-bin-cdh5.3.0 root@n4:/opt

你可能感兴趣的:(shell同步目录)