Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 在rsync中使用include exclude时删除符号链接_Linux_Rsync - Fatal编程技术网

Linux 在rsync中使用include exclude时删除符号链接

Linux 在rsync中使用include exclude时删除符号链接,linux,rsync,Linux,Rsync,我需要使用rsync将一些文件从一个目录同步到另一个目录 rsync -rvl --include "*/" --include='file.qcow2' --include='file.qcow2' --exclude='*' --exclude='lost+found' /dir/ /dir/ || echo "error: rsync of images failed on $svr" 包含的文件位于一个文件夹下,该文件夹中有一个指向该文件的符号链

我需要使用rsync将一些文件从一个目录同步到另一个目录

rsync -rvl --include "*/" --include='file.qcow2' --include='file.qcow2' --exclude='*' --exclude='lost+found' /dir/ /dir/ || echo "error: rsync of images failed on $svr"
包含的文件位于一个文件夹下,该文件夹中有一个指向该文件的符号链接。包含文件夹和文件,但不包含符号链接。 如果删除“排除”,则会复制符号链接,但也会复制我不想复制的所有其他文件。 是否有任何方法可以复制文件和符号链接,同时排除所有其他文件? 多谢各位