How can I use grep
to show just file-names (no in-line matches) on Linux? 如何在Linux上使用grep
來顯示文件名(沒有內聯匹配)? php
I am usually using something like: 我一般使用相似的東西: this
find . -iname "*php" -exec grep -H myString {} \;
How can I just get the file-names (with paths), but without the matches? 我怎樣才能得到文件名(帶路徑),但沒有匹配? Do I have to use xargs
? 我必須使用xargs
嗎? I didn't see a way to do this on my grep
man page. 我沒有在grep
手冊頁上看到這樣作的方法。 spa