命令格式如下
find / ( -name "*.war" -o -name "*.jar" ) | xargs -i cp {} ${wardir}
当需要查找多个条件时候使用()然后加两个-name ()需要使用转义符号
xargs -i cp {} ${wardir}重定向把查找出来的文件拷贝至指定文件夹