To understand recursive grep in xargs

前端 未结 2 1995
轻奢々
轻奢々 2021-01-24 04:04

What is the practical difference between the following two commands?

Command A

find . -type f -print0 | xargs -0 grep -r masi       
         


        
2条回答
  •  鱼传尺愫
    2021-01-24 04:44

    None .. -r is for recursively searching directories, but the -type f will prevent find from returning directory names.

提交回复
热议问题