Posts Tagged “-exec”

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 -exec command ‘{}\;‘ it needs to be -exec command ‘{} \;‘ . 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).

Just something new learnt, and hopefully for a few people less headache.

Tags: none

Tags: -exec, find

Comments 3 Comments »

Bad Behavior has blocked 1253 access attempts in the last 7 days.