Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 "+"

I know I probably have it wrong, but I can't figure out what's missing?

question from:https://stackoverflow.com/questions/25142822/error-find-exec-no-terminating-or

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
412 views
Welcome To Ask or Share your Answers For Others

1 Answer

Just terminate the find command with ;, making sure to include the space before the ;.

find /Volumes/NEXSAN/Engine Folders/Input/DTO_Proxy/* -type f -mtime +7 -exec mv -v {} /Volumes/NEXSAN/.2BeDeleted4realz/ ;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...