find: 用來搜尋目錄下面的特定檔案
grep: 用來搜尋該檔案是否有包含特定關鍵字
如果要配合運作可以用xargs
example :
//從根目錄搜尋所有index.php的檔名,裡面是否有包含helloworld關鍵字
find / -name index.php | xargs grep helloworld

- Oct 27 Mon 2014 13:32
-
在linux/unix下搜尋某些特定檔案是否包含關鍵字
請先 登入 以發表留言。