sed experts. Help

Jonas Norlander jonorland at gmail.com
Thu Oct 23 17:50:54 UTC 2008


2008/10/23 Rick Knight <rick_knight at rlknight.com>:
> One more question, How can I make this command work recursively. I tried
> just adding "find <dir> -type f exec"  to the front of the command but
> it gives an error...
>
> find: missing argument to `-exec'
>

I think you missed the '{}' \; that must be last if you use -exec with find.

> I've also added the file exstension to Jarreds command but that also
> gives an error...
>
> find: paths must precede expression.
>
> How can I combine recursive function and the file extension? There are
> several .html and .cfg files that don't need to fixed, so I would like
> to avoid them if possible.
>

Use the -name or -iname options with fine

find <dir> -type f -iname *.php - exec....

/ Jonas




More information about the kubuntu-users mailing list