12

查找不包含给定字符串的文件

 2 years ago
source link: https://zhiqiang.org/it/find-files-without-given-text-pattern.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

查找不包含给定字符串的文件

作者: 张志强

, 2022-12-13

, 共 164 字 , 共阅读 11 次

最简单的方式是使用grep-L参数,查找当前目录下不包含指定字符串的文件:

grep -L "pattern" . -r

如果还想筛选后缀,可结合find命令:

grep -L "pattern" `find . -type f -iname "*.cpp"`

Q. E. D.

avatar-0.jpg

2022-12-11,

户外 »

亲子骑行, 奥森

下午我们尝试骑行了奥森,从南园的国奥村门出发,顺势针骑到北园,再沿着小清河南岸起到北园西边,再从安立路往南,科荟路往东。轨迹已上传到两步路:20221211 奥森南园北园亲子骑行

</section


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK