linux查詢包含某ip的文件
一、grep命令grep即 (global search regular expression(RE) and print out the line
eg:grep -F 192.168.1.1 -R ./
二、find結合grep
從根目錄開始查找所有文本文件,并找出包含""的行
192.168.1.1
find ./ -type f -print | xargs grep 192.168.1.1
從根目錄開始查找所有擴展名為.的文本文件,并找出包含"192"的行
properties
find . -type f -name "*.properties" | xargs grep "192"
Gavin
posted on 2011-09-02 11:13 GavinMiao 閱讀(381) 評論(0) 編輯 收藏 所屬分類: linux