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

Niklas Höglund niklas.hoglund at telia.com
Wed Oct 20 18:56:08 UTC 2004


ons 2004-10-20 klockan 11:32 -0700 skrev R. Weber:
> Hello. I have a script that uses the "-exec" option of the find command, which 
> busybox doesn't support. As in:
> 
>   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? Does anyone have a patch to add "exec" to 
> find or "-i" to xargs? Am I missing something?

How about

  for i in `find / -follow -name filename.xxx`; do cp $i /tmp; done

-- 
						Niklas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad
	meddelandedel
Url : http://lists.busybox.net/pipermail/busybox/attachments/20041020/ff01ca06/attachment-0002.pgp 


More information about the busybox mailing list