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.
次の 2 つのコマンドの実質的な違いは何ですか?
コマンド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はファイル名を再帰しようとするので(検索はファイルを検索するだけなので)、何も再帰しないと思います...