使用rsync进行选择性复制

有时候复制文件夹希望不全部复制,而是有选择的进行。
这时候就可以使用rsync。

1
rsync -av --exclude cache/ src_folder/ target_folder/

其中exclude参数可以多次使用。
在命令中使用-n可以干运行