[root@pc1 test2]# ls a.txt b.csv c.ped test_dir [root@pc1 test2]# ls test_dir/ [root@pc1 test2]# find ./ -name "*.txt" -o -name "*.ped" -exec cp {} test_dir/ \; [root@pc1 test2]# ls test_dir/ c.ped [root@pc1 test2]# rm test_dir/* [root@pc1 test2]# ls test_dir/ [root@pc1 test2]# find ./ \( -name "*.txt" -o -name "*.ped" \) -exec cp {} test_dir/ \; [root@pc1 test2]# ls test_dir/ a.txt c.ped
。
标签:test2,pc1,ls,test,root,find,dir From: https://www.cnblogs.com/liujiaxin2018/p/17716412.html