That’s maybe some common Error you’re receiving, when you’re new to find and the exec parameter. So I encountered the Problem as well.
After a short research within the man page of find the problem was found: ;
needs to be escaped with a Backslash \
. The look over to my commandline just showed that this was already the case. Now the internet was asked and most results just reveal the same thing: escape the ;
with a Backslash.
Some hits later I found a german page where they told that it’s even required that the \;
is separated from the previous commands with a space \;
. So it’s not enough to write:
1
|
|
,
it needs to be (notice the extra whitespace between command
and {}
):
1
|
|
Well from my point of view some mistake which can be fast overseen, even more if you suppose that {}\;
should work out nicely as it’s something which occurs often or everytime within the exec(at least these groups of signs).