发现:缺少参数-exec [英] find: missing argument to -exec

查看:1441
本文介绍了发现:缺少参数-exec的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天帮了一个命令,但它似乎并不奏效。这是命令:

I was helped out today with a command, but it doesn't seem to be working. This is the command:

find /home/me/download/ -type f -name "*.rm" -exec ffmpeg -i {} -sameq {}.mp3 && rm {}\;

外壳返回

find: missing argument to `-exec'

什么我基本上试图做的是去通过目录递归(如果有其他的目录)并运行在 .rm格式文件类型FFmpeg的命令,并将其转换到 .MP3 文件类型。一旦做到这一点,删除 .rm格式文件刚刚转换。

What I am basically trying to do is go through a directory recursively (if it has other directories) and run the ffmpeg command on the .rm file types and convert them to .mp3 file types. Once this is done, remove the .rm file that has just been converted.

我AP preciate有这方面的帮助。

I appreciate any help on this.

推荐答案

我现在想通了。当你需要在发现运行EXEC两个命令,你需要真正有两个单独的高管。这次终于为我工作。

I figured it out now. When you need to run two commands in exec in a find you need to actually have two separate execs. This finally worked for me.

find . -type f -name "*.rm" -exec ffmpeg -i {} -sameq {}.mp3 \; -exec rm {} \;

这篇关于发现:缺少参数-exec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆