背景

如果你有使用grep -r的经历, 那么其搜索速度可能会让人抓狂. ag命令比grep -r功能强太多, 而且搜索速度非常快!

官网

https://github.com/ggreer/the_silver_searcher

安装

centos系统安装:

sudo yum install the_silver_searcher

ubuntu系统安装:

sudo apt install silversearcher-ag

使用

$ pwd
/data/soft/istio-1.13.4
$ ag 'kind: Service' | head  
samples/extauthz/ext-authz.yaml:18:kind: Service
samples/extauthz/local-ext-authz.yaml:19:kind: ServiceEntry
samples/extauthz/local-ext-authz.yaml:35:kind: ServiceEntry
samples/extauthz/local-ext-authz.yaml:81:kind: Service
samples/extauthz/local-ext-authz.yaml:96:kind: ServiceAccount
samples/ratelimit/rate-limit-service.yaml:40:kind: Service
samples/ratelimit/rate-limit-service.yaml:77:kind: Service
samples/websockets/app.yaml:2:kind: Service
samples/helloworld/gen-helloworld.sh:48:kind: Service
samples/helloworld/helloworld.yaml:2:kind: Service

(完)

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐