以下命令可以正常工作,仅复制与 Mem* 匹配的文件
rsync -uvma '--include=*/' '--include=**/Mem*'
'--exclude=*' ../srcdir/ /targdir
我还想排除某种模式*.class
。这是尝试添加的内容:
'--exclude=**/*.class'
完整的命令是
rsync -uvma '--include=*/' '--include=**/Mem*'
'--exclude=*' '--exclude=**/*.class' ../srcdir/ /targdir
添加没有效果。该命令确实复制 *.class 文件:
./target/classes/com/blazedb/sparkperf/MemBattery$$anonfun$3.class
./target/classes/com/blazedb/sparkperf/MemBattery$$anonfun$4.class
./target/classes/com/blazedb/sparkperf/MemBattery$$anonfun$5.class
./target/classes/com/blazedb/sparkperf/MemBattery$$anonfun$6.class
./target/classes/com/blazedb/sparkperf/MemBattery.class
sent 67536 bytes received 510 bytes 136092.00 bytes/sec
total size is 67080 speedup is 0.99
那么这种排除模式应该如何形成呢?