linux查找文件内容

从文件内容查找匹配指定字符串的行:
$ grep【global regular expression and print】 "被查找的字符串" 文件名


从文件内容查找与正则表达式匹配的行:
$ grep –e “正则表达式” 文件名


查找时不区分大小写:
$ grep –i "被查找的字符串" 文件名

原文地址:https://www.cnblogs.com/maqunjing/p/3083143.html