如何在目录中查找具有指定字符串的文件(shell)

find /tmp/ -name test.txt | xargs grep "hello"

可以查找到tmp目录下文件名test.txt并包含字符串hello的文件。

posted on 2014-10-17 14:06  小生有悔  阅读(940)  评论(0编辑  收藏  举报

导航