Linux rsync不复制我的文件

Linux rsync不复制我的文件,linux,bash,rsync,Linux,Bash,Rsync,我试图使用rsync仅从给定目录复制.c文件。因此,我尝试了以下命令: rsync -nrv --include="*.c" --exclude="*" test/ temp/ 输出: sending incremental file list test1.c test2.c sent 63 bytes received 18 bytes 162.00 bytes/sec 找到了我想要复制的数据,但当我选中“temp”时,它是空的。 我还尝试让rsync创建目录,输出如下: sendi

我试图使用rsync仅从给定目录复制.c文件。因此,我尝试了以下命令:

rsync -nrv --include="*.c" --exclude="*" test/ temp/
输出:

sending incremental file list
test1.c
test2.c

sent 63 bytes  received 18 bytes  162.00 bytes/sec
找到了我想要复制的数据,但当我选中“temp”时,它是空的。 我还尝试让rsync创建目录,输出如下:

sending incremental file list
created directory temp
./
test1.c
test2.c

sent 66 bytes  received 21 bytes  174.00 bytes/sec
但当我检查目录“temp”时,它不存在。
我做错了什么

你给了
-n
,意思是“干运行”

删除
-n

您至少应该查看手册页中所使用的选项,以了解其含义:

 -n, --dry-run               perform a trial run with no changes made

你给了
-n
,意思是“干运行”

删除
-n

您至少应该查看手册页中所使用的选项,以了解其含义:

 -n, --dry-run               perform a trial run with no changes made