To understand recursive grep in xargs

前端 未结 2 1993
轻奢々
轻奢々 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.

    0 讨论(0)
  • 2021-01-24 05:02

    I think none The A will try to recurse over file names (as the find is only searching for files) so it will not recurse into anything...

    0 讨论(0)
提交回复
热议问题