[BusyBox] Find doesn't have "-exec", xargs doesn't have "-i"

Larry Doolittle ldoolitt at recycle.lbl.gov
Wed Oct 20 18:55:44 UTC 2004


Robert -

> busybox [find] doesn't support.
>   find / -follow -name filename.xxx -exec cp "{}" /tmp
> 
> So, I'm trying to replace it with something like:
>   find / -follow -name filename.xxx | xargs -i cp {} /tmp
> 
> but xargs doesn't support the -i option. Does anyone have another suggestion 
> to how to do this with one line?

find / -follow -name filename.xxx | while read foo; do cp $foo /tmp; done

Not tested in busybox ash, but it ought to work in any Bourne-compatible
shell.

      - Larry



More information about the busybox mailing list