【发布时间】:2019-01-29 22:49:23
【问题描述】:
我必须递归地重命名与模式匹配的所有文件。我正在使用以下命令。
find . -type f -iname 'dev*' | xargs -I{} mv $1 echo '/dev-profile/prod-profile'
当我运行上述命令时,我收到以下错误
missing destination file operand after /dev-profile/prod-profile
我需要递归替换所有文件。我哪里出错了。
【问题讨论】:
-
用文字解释你希望你的代码做什么。提供一些示例预期源路径及其对应的目标路径。然后我们可以解释如何最好地整理您的代码。