我有5个文件要取消rar(我已经做了很多次(:
find . -name "*.rar"
./Udemy_Kubernetes_Mastery_Hands-On_Lessons_From_A_Docker_Captain_2020-4.part5_Downloadly.ir.rar
./Udemy_Kubernetes_Mastery_Hands-On_Lessons_From_A_Docker_Captain_2020-4.part2_Downloadly.ir.rar
./Udemy_Kubernetes_Mastery_Hands-On_Lessons_From_A_Docker_Captain_2020-4.part4_Downloadly.ir.rar
./Udemy_Kubernetes_Mastery_Hands-On_Lessons_From_A_Docker_Captain_2020-4.part1_Downloadly.ir.rar
./Udemy_Kubernetes_Mastery_Hands-On_Lessons_From_A_Docker_Captain_2020-4.part3_Downloadly.ir.rar
我的命令
find . -name "*.rar" -exec unrar x -o+ ; Udemy_Kubernetes_Mastery_Hands-On_Lessons_From_A_Docker_Captain_2020-4.part1_Downloadly.ir.rar
我收到错误
find: paths must precede expression: `Udemy_Kubernetes_Mastery_Hands-On_Lessons_From_A_Docker_Captain_2020-4.part1_Downloadly.ir.rar'
find: possible unquoted pattern after predicate `-exec'?
为什么?
将命令更改为:
find . -name "*.rar" -exec unrar x -o+ {} ;
其中{}
表示由find
命令找到的文件。