in reply to Re^2: Run system find -exec on remote machine
in thread Run system find -exec on remote machine

Your suggestions (@you > 1) make sense, and I use xargs a lot on local machines; no reason to avoid it on remote ones.

In regard your comment about xargs bunching up args and thus forking off less: sure, but sometimes that's not what you want (some commands really do need to run one file at a time). So just for the sake of completeness (I know you may already know this): the -n switch to xargs accepts a number of arguments to bunch up to every forked command. The two following lines are roughtly equivalent:

find . -exec somecmd \{} \; find . -print0 | xargs -0 -n 1 somecmd

BTW, some versions of xargs have a nifty concurrency switch, -P on the GNU variant. This too is sometimes very much not what you want, though :)