loading...

rg instead of grep

github logo ・1 min read

linux-tools (4 Part Series)

1) bat instead of cat 2) exa instead of ls 3) rg instead of grep 4) fd instead of find

ripgrep aka rg provides great defaults to search inside files.

It automatically skip .git directories and files ignored by git reducing the amount of data being searched.

These are sane defaults to have and can safe you a lot of development time.

Searching for the same word inside the same directory gives me this.

With rg

time rg -li 'pattern'
real    0m17.514s
user    0m15.610s
sys     0m8.822s

With grep

time grep -ilR 'pattern'
real    1m9.520s
user    0m29.768s
sys     0m8.352s
twitter logo DISCUSS
Classic DEV Post from Apr 4 '19

What's an awesome VS Code extension you recently installed?

I just came across a simple yet awesome VS Code extension tonight care of Elija...

João Vitor profile image

👋 Hey dev.to reader.

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❤️