bash 错误 = 查找:-exec:没有终止“;” 或“+”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25142822/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error = find: -exec: no terminating ";" or "+"
提问by user2983956
I am looking for some help trying to get a command working. I want to find some files only and move them, but when I enter this command:
我正在寻找一些帮助,试图让命令正常工作。我只想找到一些文件并移动它们,但是当我输入这个命令时:
find /Volumes/NEXSAN/Engine\ Folders/Input/DTO_Proxy/* -type f -mtime +7 -exec mv -v {} /Volumes/NEXSAN/.2BeDeleted4realz/
I get this error
我收到这个错误
find: -exec: no terminating ";" or "+"
查找:-exec:没有终止“;” 或“+”
I know I probably have it wrong, but I can't figure out what's missing?
我知道我可能弄错了,但我不知道缺少什么?
回答by Avinash Raj
Just terminate the find command with \;
, making sure to include the space before the \;
.
只需用 终止 find 命令\;
,确保在\;
.
find /Volumes/NEXSAN/Engine\ Folders/Input/DTO_Proxy/* -type f -mtime +7 -exec mv -v {} /Volumes/NEXSAN/.2BeDeleted4realz/ \;