0
I get the error find: missing argument to
-exec'` when I attempt to run the command
find . -maxdepth 1 \( -iname \*.png -o -iname \*.jpg \) -exec echo {} \;
The reason I am using echo
is because I want to make sure it is returning the results I expect before I replace it with either rm
or mv
. What am I doing wrong?
try getting rid of the superfluous dot at the end? – Sparr – 2012-09-15T07:20:43.937
@Sparr - Sorry added a period in the post as I ended my sentence. The period does not appear in the command I execute. – PeanutsMonkey – 2012-09-15T07:22:59.227
Running it on find version 4.4.2, I receive no error. It has successfully found the .png file. – bbaja42 – 2012-09-15T07:29:28.700
@bbaja42 - I found the issue. I was using colons as opposed to a semi-colon in the command I was executing. The example I posted was typed out and not pasted so didn't have the actual error in my syntax. – PeanutsMonkey – 2012-09-15T07:34:29.583