[plug] error in find command

Mike Holland myk.list at westnet.com.au
Wed Aug 17 10:14:08 WST 2005


Jon Miller wrote:
> Trying to fix a command that deletes all files with the word executable in it using the following command
> find ./ -name "executable" -exec rm {};/
> But I keep getting a error message stating that there is an missing argument to -exec any idea?

You need to escape the '{}' and the ';' from the shell.

e.g.  find ./ -name '*executable*' -exec /bin/rm -- '{}' \;

Also, I'd add a "--" arg to rm.
What if a file is called "-rf /" ? :-)




More information about the plug mailing list