Make xargs execute the command once for each line of input

后端 未结 13 621
栀梦
栀梦 2020-11-29 15:09

How can I make xargs execute the command exactly once for each line of input given? It\'s default behavior is to chunk the lines and execute the command once, passing multip

13条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 15:23

    In your example, the point of piping the output of find to xargs is that the standard behavior of find's -exec option is to execute the command once for each found file. If you're using find, and you want its standard behavior, then the answer is simple - don't use xargs to begin with.

提交回复
热议问题