On Jan 18, 4:04 am, Peter Otten <[email protected]> wrote: > > What's the advantage of 'find ... | xargs ...' over 'find ... -exec ...'?
Portability. Running the '-exec' version will work fine in a directory with a relatively small number of files, but will fail on a large one. 'xargs', which is designed to handle exactly that situations, splits the returned output into chunks that can be handled by 'rm' and such. '|xargs' is always the preferred option when you don't know how large the output is going to be. -- http://mail.python.org/mailman/listinfo/python-list
