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

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



grep -i java /etc/profile



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

原文地址:https://www.cnblogs.com/BaiLaowu/p/9499505.html

时间: 2024-08-26 18:21:49