find -exec cmd {} + vs | xargs

前端 未结 3 463
半阙折子戏
半阙折子戏 2020-12-22 14:48

Which one is more efficient over a very large set of files and should be used?

find . -exec cmd {} +

or

find . | xargs cmd
         


        
3条回答
  •  我在风中等你
    2020-12-22 15:19

    Modern xargs's versions often support parallel pipeline execution.

    Obviously it might be a pivot point when it comes to choice between find … -exec and … | xargs

提交回复
热议问题