On Tuesday 16 June 2009 06:03:33 Daniel Underwood wrote: > > $ find ./ -name "*.pem" -exec cp {} /usr/home/tmp/something \; > > I'm a novice with shell scripting myself, but what's the difference > between that code and some variant thereof using a pipe and "xargs"? > Are they simply two different ways of achieving the same result? Or > is there some more important difference I may be overlooking?
Moises' way is less efficient as it will copy each file separately, however, if he ends with a + rather then a \;, then using exec is marginally faster as you eliminate 1 pipe from the tool chain. See find(1) for more info. -- Mel _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"