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

grep /bin/grep
grep -iv [指定字条串] [文件]
在文件中搜索字符串匹配的行并输出
-i 不区分大小写 -v 排除指定字符串


grep -i java /etc/profile


grep -v ^# /etc/profile
不显示以#开头的行

猜你喜欢

转载自www.cnblogs.com/BaiLaowu/p/9499505.html
今日推荐