exec command

Colin Law clanlaw at googlemail.com
Sat Jan 14 11:30:44 UTC 2012


On 14 January 2012 11:19, CJ Tres <ctres at grics.net> wrote:
> I'm trying to use the find and execute commands to remove *.html files in
> various subdirectories within a single directory but the command returns
> "missing argument to `-exec'
>
> the command I've entered is:
> find -type f -exec rm -rf"
> followed by the path, followed by:
> -iname '*.html'
>
> Find alone has found all the files but I'm not understanding what is wrong
> with the syntax "-exec rm -rf"
>
> Can someone see an obvious error?

man find shows an example similar to your requirement
find . -type f -exec file '{}' \;
which suggests that you have got some bits missing from the exec spec.

Colin




More information about the ubuntu-users mailing list