in reply to Re: Run system find -exec on remote machine
in thread Run system find -exec on remote machine
Indeed. Apart from nicer syntax, xargs is much faster because it doesn't fork the command for each file. The only nuisance I've encountered with xargs is portably coping with space-riddled file names. As Aristotle points out, GNU find/xargs work well. Lacking GNU utilities, I've used this:
find . -print0 | xargs -0 ls -l (GNU only) find . -print | sed 's/ /\\ /g' | xargs ls -l (works everywhere)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Run system find -exec on remote machine
by Aristotle (Chancellor) on Dec 21, 2004 at 06:25 UTC | |
|
Re^3: Run system find -exec on remote machine
by gaal (Parson) on Dec 21, 2004 at 06:47 UTC |