In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of what functions ripgrep has, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this ripgrep article. Let's take a look at it.
First, `grep` is a line search tool that we use almost every day in Linuxer, and almost all distributions come with this tool. For many years, nothing has changed, such as a pool of stagnant water. The emergence of `ripgrep` has brought a sensation to this field.
Ripgrep is very good, and now its github is close to 14000 stars.
The first point that ripgrep surpasses grep is that ripgrep is cross-platform and no longer discriminates against Windows users. Windows and Linux,macOS have the same effect.
Second, have a more beautiful output.
Of course, the question of beauty is hard to tune.
Third, strong performance.
It's a mule or a horse. Take it out for a walk.
Comparison 1:
Search for Linux kernel source files (after executing make defconfig & & make-J8), CPU Intel i7-6900K 3.2 GHz,ripgrep has SIMD support.
Tool command line statistics time
Ripgrep (Unicode) rg-n-w'[Amurz] + _ SUSPEND'4500.106sgit grepLC_ALL=C git grep-E-n-w'[Amurz] + _ SUSPEND'4500.553sThe Silver Searcherag-w'[Amurz] + _ SUSPEND'4500.589sgit grep (Unicode) LC_ALL=en_US.UTF-8 git grep-E-n-w'[Amurz] + _ SUSPEND'4502.266ssiftsift-- git-n-w'[Amurz] + _ SUSPEND'4503.505sackack-w' [Amurz] + _ SUSPEND'18786.823sThe Platinum Searcherpt-w-e'[Amurz] + _ SUSPEND'45014.208s
(above, ack has a bug:))
Comparison 2:
Or search the Linux kernel source code, the search scope and parameters have changed.
Tool command line statistics time
Ripgreprg-L-u-tc-n'[Amurz] + _ SUSPEND'4040.079sucgucg-- type=cc-w'[Amurz] + _ SUSPEND'3900.163sGNU grepegrep-R-n-include='*.c'-- include='*.h'-w'[Amurz] + _ SUSPEND'4040.611s
(ucg has a different strategy when dealing with symbolic links.)
Comparison 3:
Search for a large file of about 9.3G.
Tool command line statistics ripgreprg-w'Sherlock [Amurz]\ w+'52682.108sGNU grepLC_ALL=C egrep-w'Sherlock [Amurz]\ tool command line statistics 52687.014s
Why ripgrep is recommended
Because it covers most of the features of other similar search tools and is faster.
Ripgrep recognizes the .gitignore file and ignores the files and directories specified in it. Hidden files and directories are not searched by default. Binaries are not searched by default.
Ripgrep can specify to search for certain types of files. For example, rg-tpy foo only searches for py files, while rg-Tjs foo excludes js files when searching.
Ripgrep supports Unicode.
PCRE2 can be selected as the regular engine.
Support the search of non-UTF-8 files.
Support the search of files in the compressed package.
Any preprocessing filter is supported.
What are you waiting for? do it right away.
This is the end of $cargo install ripgrep's article on "what are the functions of ripgrep?" Thank you for reading! I believe you all have a certain understanding of the knowledge of "what are the functions of ripgrep". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.