1. 程式人生 > >linux 文件搜索命令 grep、-i、-v ^#

linux 文件搜索命令 grep、-i、-v ^#

color 字符串 -i style inux 指定 gre 搜索 不顯示

grep /bin/grep
grep -iv [指定字條串] [文件]
在文件中搜索字符串匹配的行並輸出
-i 不區分大小寫 -v 排除指定字符串


grep -i java /etc/profile


grep -v ^# /etc/profile
不顯示以#開頭的行

linux 文件搜索命令 grep、-i、-v ^#