2019年4月15日
摘要: 普通用法 #查看包含hello的行,取分大小写 grep 'hello' file #查看包含hello的行,忽略大小写 grep -i 'hello' file #查看包含hello的行,有多少行 grep -c 'hello' file #查看包含hello的行,并且标记行号 grep -n ' 阅读全文
posted @ 2019-04-15 18:00 黑夜开发者 阅读(23) 评论(0) 推荐(0)
摘要: find主要用于文件查找,参数丰富,基本够用,支持简单的正则。 通过文件名查找 #查找当前目录下面以.txt结尾的文件,.也可以省略 find . -name "*.txt" #简单的正则,匹配0-9开头的文件 find . -name "[0-9]*" #查找etc目录下面的nginx.conf这 阅读全文
posted @ 2019-04-15 17:02 黑夜开发者 阅读(139) 评论(0) 推荐(0)