Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下两个命令之间的实际区别是什么?
命令 A
find . -type f -print0 | xargs -0 grep -r masi
命令 B
find . -type f -print0 | xargs -0 grep masi
简而言之,命令 A 的实际好处是什么?
None ..-r用于递归搜索目录,但-type f会阻止find返回目录名称。
-r
-type f
find
我认为没有 A 会尝试递归文件名(因为 find 只是搜索文件)所以它不会递归到任何东西......