{"id":13393912,"url":"https://github.com/BurntSushi/ripgrep","last_synced_at":"2025-03-13T19:31:51.423Z","repository":{"id":37270525,"uuid":"53631945","full_name":"BurntSushi/ripgrep","owner":"BurntSushi","description":"ripgrep recursively searches directories for a regex pattern while respecting your gitignore","archived":false,"fork":false,"pushed_at":"2025-02-27T17:47:39.000Z","size":4971,"stargazers_count":51007,"open_issues_count":171,"forks_count":2084,"subscribers_count":294,"default_branch":"master","last_synced_at":"2025-03-13T17:29:21.920Z","etag":null,"topics":["cli","command-line","command-line-tool","gitignore","grep","recursively-search","regex","ripgrep","rust","search"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BurntSushi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["BurntSushi"]}},"created_at":"2016-03-11T02:02:33.000Z","updated_at":"2025-03-13T16:35:53.000Z","dependencies_parsed_at":"2023-09-27T19:14:20.429Z","dependency_job_id":"8db934ba-9254-4c71-acaa-d635c389a6b6","html_url":"https://github.com/BurntSushi/ripgrep","commit_stats":{"total_commits":1988,"total_committers":406,"mean_commits":4.896551724137931,"dds":0.3048289738430584,"last_synced_commit":"94305125ef33b86151b6cd2ce2b33d641f6b6ac3"},"previous_names":[],"tags_count":233,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurntSushi%2Fripgrep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurntSushi%2Fripgrep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurntSushi%2Fripgrep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurntSushi%2Fripgrep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BurntSushi","download_url":"https://codeload.github.com/BurntSushi/ripgrep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243447599,"owners_count":20292455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","command-line-tool","gitignore","grep","recursively-search","regex","ripgrep","rust","search"],"created_at":"2024-07-30T17:01:02.430Z","updated_at":"2025-03-13T19:31:51.390Z","avatar_url":"https://github.com/BurntSushi.png","language":"Rust","readme":"ripgrep (rg)\n------------\nripgrep is a line-oriented search tool that recursively searches the current\ndirectory for a regex pattern. By default, ripgrep will respect gitignore rules\nand automatically skip hidden files/directories and binary files. (To disable\nall automatic filtering by default, use `rg -uuu`.) ripgrep has first class\nsupport on Windows, macOS and Linux, with binary downloads available for [every\nrelease](https://github.com/BurntSushi/ripgrep/releases). ripgrep is similar to\nother popular search tools like The Silver Searcher, ack and grep.\n\n[![Build status](https://github.com/BurntSushi/ripgrep/workflows/ci/badge.svg)](https://github.com/BurntSushi/ripgrep/actions)\n[![Crates.io](https://img.shields.io/crates/v/ripgrep.svg)](https://crates.io/crates/ripgrep)\n[![Packaging status](https://repology.org/badge/tiny-repos/ripgrep.svg)](https://repology.org/project/ripgrep/badges)\n\nDual-licensed under MIT or the [UNLICENSE](https://unlicense.org).\n\n\n### CHANGELOG\n\nPlease see the [CHANGELOG](CHANGELOG.md) for a release history.\n\n### Documentation quick links\n\n* [Installation](#installation)\n* [User Guide](GUIDE.md)\n* [Frequently Asked Questions](FAQ.md)\n* [Regex syntax](https://docs.rs/regex/1/regex/#syntax)\n* [Configuration files](GUIDE.md#configuration-file)\n* [Shell completions](FAQ.md#complete)\n* [Building](#building)\n* [Translations](#translations)\n\n\n### Screenshot of search results\n\n[![A screenshot of a sample search with ripgrep](https://burntsushi.net/stuff/ripgrep1.png)](https://burntsushi.net/stuff/ripgrep1.png)\n\n\n### Quick examples comparing tools\n\nThis example searches the entire\n[Linux kernel source tree](https://github.com/BurntSushi/linux)\n(after running `make defconfig \u0026\u0026 make -j8`) for `[A-Z]+_SUSPEND`, where\nall matches must be words. Timings were collected on a system with an Intel\ni9-12900K 5.2 GHz.\n\nPlease remember that a single benchmark is never enough! See my\n[blog post on ripgrep](https://blog.burntsushi.net/ripgrep/)\nfor a very detailed comparison with more benchmarks and analysis.\n\n| Tool | Command | Line count | Time |\n| ---- | ------- | ---------- | ---- |\n| ripgrep (Unicode) | `rg -n -w '[A-Z]+_SUSPEND'` | 536 | **0.082s** (1.00x) |\n| [hypergrep](https://github.com/p-ranav/hypergrep) | `hgrep -n -w '[A-Z]+_SUSPEND'` | 536 | 0.167s (2.04x) |\n| [git grep](https://www.kernel.org/pub/software/scm/git/docs/git-grep.html) | `git grep -P -n -w '[A-Z]+_SUSPEND'` | 536 | 0.273s (3.34x) |\n| [The Silver Searcher](https://github.com/ggreer/the_silver_searcher) | `ag -w '[A-Z]+_SUSPEND'` | 534 | 0.443s (5.43x) |\n| [ugrep](https://github.com/Genivia/ugrep) | `ugrep -r --ignore-files --no-hidden -I -w '[A-Z]+_SUSPEND'` | 536 | 0.639s (7.82x) |\n| [git grep](https://www.kernel.org/pub/software/scm/git/docs/git-grep.html) | `LC_ALL=C git grep -E -n -w '[A-Z]+_SUSPEND'` | 536 | 0.727s (8.91x) |\n| [git grep (Unicode)](https://www.kernel.org/pub/software/scm/git/docs/git-grep.html) | `LC_ALL=en_US.UTF-8 git grep -E -n -w '[A-Z]+_SUSPEND'` | 536 | 2.670s (32.70x) |\n| [ack](https://github.com/beyondgrep/ack3) | `ack -w '[A-Z]+_SUSPEND'` | 2677 | 2.935s (35.94x) |\n\nHere's another benchmark on the same corpus as above that disregards gitignore\nfiles and searches with a whitelist instead. The corpus is the same as in the\nprevious benchmark, and the flags passed to each command ensure that they are\ndoing equivalent work:\n\n| Tool | Command | Line count | Time |\n| ---- | ------- | ---------- | ---- |\n| ripgrep | `rg -uuu -tc -n -w '[A-Z]+_SUSPEND'` | 447 | **0.063s** (1.00x) |\n| [ugrep](https://github.com/Genivia/ugrep) | `ugrep -r -n --include='*.c' --include='*.h' -w '[A-Z]+_SUSPEND'` | 447 | 0.607s (9.62x) |\n| [GNU grep](https://www.gnu.org/software/grep/) | `grep -E -r -n --include='*.c' --include='*.h' -w '[A-Z]+_SUSPEND'` | 447 | 0.674s (10.69x) |\n\nNow we'll move to searching on single large file. Here is a straight-up\ncomparison between ripgrep, ugrep and GNU grep on a file cached in memory\n(~13GB, [`OpenSubtitles.raw.en.gz`](http://opus.nlpl.eu/download.php?f=OpenSubtitles/v2018/mono/OpenSubtitles.raw.en.gz), decompressed):\n\n| Tool | Command | Line count | Time |\n| ---- | ------- | ---------- | ---- |\n| ripgrep (Unicode) | `rg -w 'Sherlock [A-Z]\\w+'` | 7882 | **1.042s** (1.00x) |\n| [ugrep](https://github.com/Genivia/ugrep) | `ugrep -w 'Sherlock [A-Z]\\w+'` | 7882 | 1.339s (1.28x) |\n| [GNU grep (Unicode)](https://www.gnu.org/software/grep/) | `LC_ALL=en_US.UTF-8 egrep -w 'Sherlock [A-Z]\\w+'` | 7882 | 6.577s (6.31x) |\n\nIn the above benchmark, passing the `-n` flag (for showing line numbers)\nincreases the times to `1.664s` for ripgrep and `9.484s` for GNU grep. ugrep\ntimes are unaffected by the presence or absence of `-n`.\n\nBeware of performance cliffs though:\n\n| Tool | Command | Line count | Time |\n| ---- | ------- | ---------- | ---- |\n| ripgrep (Unicode) | `rg -w '[A-Z]\\w+ Sherlock [A-Z]\\w+'` | 485 | **1.053s** (1.00x) |\n| [GNU grep (Unicode)](https://www.gnu.org/software/grep/) | `LC_ALL=en_US.UTF-8 grep -E -w '[A-Z]\\w+ Sherlock [A-Z]\\w+'` | 485 | 6.234s (5.92x) |\n| [ugrep](https://github.com/Genivia/ugrep) | `ugrep -w '[A-Z]\\w+ Sherlock [A-Z]\\w+'` | 485 | 28.973s (27.51x) |\n\nAnd performance can drop precipitously across the board when searching big\nfiles for patterns without any opportunities for literal optimizations:\n\n| Tool | Command | Line count | Time |\n| ---- | ------- | ---------- | ---- |\n| ripgrep | `rg '[A-Za-z]{30}'` | 6749 | **15.569s** (1.00x) |\n| [ugrep](https://github.com/Genivia/ugrep) | `ugrep -E '[A-Za-z]{30}'` | 6749 | 21.857s (1.40x) |\n| [GNU grep](https://www.gnu.org/software/grep/) | `LC_ALL=C grep -E '[A-Za-z]{30}'` | 6749 | 32.409s (2.08x) |\n| [GNU grep (Unicode)](https://www.gnu.org/software/grep/) | `LC_ALL=en_US.UTF-8 grep -E '[A-Za-z]{30}'` | 6795 | 8m30s (32.74x) |\n\nFinally, high match counts also tend to both tank performance and smooth\nout the differences between tools (because performance is dominated by how\nquickly one can handle a match and not the algorithm used to detect the match,\ngenerally speaking):\n\n| Tool | Command | Line count | Time |\n| ---- | ------- | ---------- | ---- |\n| ripgrep | `rg the` | 83499915 | **6.948s** (1.00x) |\n| [ugrep](https://github.com/Genivia/ugrep) | `ugrep the` | 83499915 | 11.721s (1.69x) |\n| [GNU grep](https://www.gnu.org/software/grep/) | `LC_ALL=C grep the` | 83499915 | 15.217s (2.19x) |\n\n### Why should I use ripgrep?\n\n* It can replace many use cases served by other search tools\n  because it contains most of their features and is generally faster. (See\n  [the FAQ](FAQ.md#posix4ever) for more details on whether ripgrep can truly\n  replace grep.)\n* Like other tools specialized to code search, ripgrep defaults to\n  [recursive search](GUIDE.md#recursive-search) and does [automatic\n  filtering](GUIDE.md#automatic-filtering). Namely, ripgrep won't search files\n  ignored by your `.gitignore`/`.ignore`/`.rgignore` files, it won't search\n  hidden files and it won't search binary files. Automatic filtering can be\n  disabled with `rg -uuu`.\n* ripgrep can [search specific types of files](GUIDE.md#manual-filtering-file-types).\n  For example, `rg -tpy foo` limits your search to Python files and `rg -Tjs\n  foo` excludes JavaScript files from your search. ripgrep can be taught about\n  new file types with custom matching rules.\n* ripgrep supports many features found in `grep`, such as showing the context\n  of search results, searching multiple patterns, highlighting matches with\n  color and full Unicode support. Unlike GNU grep, ripgrep stays fast while\n  supporting Unicode (which is always on).\n* ripgrep has optional support for switching its regex engine to use PCRE2.\n  Among other things, this makes it possible to use look-around and\n  backreferences in your patterns, which are not supported in ripgrep's default\n  regex engine. PCRE2 support can be enabled with `-P/--pcre2` (use PCRE2\n  always) or `--auto-hybrid-regex` (use PCRE2 only if needed). An alternative\n  syntax is provided via the `--engine (default|pcre2|auto)` option.\n* ripgrep has [rudimentary support for replacements](GUIDE.md#replacements),\n  which permit rewriting output based on what was matched.\n* ripgrep supports [searching files in text encodings](GUIDE.md#file-encoding)\n  other than UTF-8, such as UTF-16, latin-1, GBK, EUC-JP, Shift_JIS and more.\n  (Some support for automatically detecting UTF-16 is provided. Other text\n  encodings must be specifically specified with the `-E/--encoding` flag.)\n* ripgrep supports searching files compressed in a common format (brotli,\n  bzip2, gzip, lz4, lzma, xz, or zstandard) with the `-z/--search-zip` flag.\n* ripgrep supports\n  [arbitrary input preprocessing filters](GUIDE.md#preprocessor)\n  which could be PDF text extraction, less supported decompression, decrypting,\n  automatic encoding detection and so on.\n* ripgrep can be configured via a\n  [configuration file](GUIDE.md#configuration-file).\n\nIn other words, use ripgrep if you like speed, filtering by default, fewer\nbugs and Unicode support.\n\n\n### Why shouldn't I use ripgrep?\n\nDespite initially not wanting to add every feature under the sun to ripgrep,\nover time, ripgrep has grown support for most features found in other file\nsearching tools. This includes searching for results spanning across multiple\nlines, and opt-in support for PCRE2, which provides look-around and\nbackreference support.\n\nAt this point, the primary reasons not to use ripgrep probably consist of one\nor more of the following:\n\n* You need a portable and ubiquitous tool. While ripgrep works on Windows,\n  macOS and Linux, it is not ubiquitous and it does not conform to any\n  standard such as POSIX. The best tool for this job is good old grep.\n* There still exists some other feature (or bug) not listed in this README that\n  you rely on that's in another tool that isn't in ripgrep.\n* There is a performance edge case where ripgrep doesn't do well where another\n  tool does do well. (Please file a bug report!)\n* ripgrep isn't possible to install on your machine or isn't available for your\n  platform. (Please file a bug report!)\n\n\n### Is it really faster than everything else?\n\nGenerally, yes. A large number of benchmarks with detailed analysis for each is\n[available on my blog](https://blog.burntsushi.net/ripgrep/).\n\nSummarizing, ripgrep is fast because:\n\n* It is built on top of\n  [Rust's regex engine](https://github.com/rust-lang/regex).\n  Rust's regex engine uses finite automata, SIMD and aggressive literal\n  optimizations to make searching very fast. (PCRE2 support can be opted into\n  with the `-P/--pcre2` flag.)\n* Rust's regex library maintains performance with full Unicode support by\n  building UTF-8 decoding directly into its deterministic finite automaton\n  engine.\n* It supports searching with either memory maps or by searching incrementally\n  with an intermediate buffer. The former is better for single files and the\n  latter is better for large directories. ripgrep chooses the best searching\n  strategy for you automatically.\n* Applies your ignore patterns in `.gitignore` files using a\n  [`RegexSet`](https://docs.rs/regex/1/regex/struct.RegexSet.html).\n  That means a single file path can be matched against multiple glob patterns\n  simultaneously.\n* It uses a lock-free parallel recursive directory iterator, courtesy of\n  [`crossbeam`](https://docs.rs/crossbeam) and\n  [`ignore`](https://docs.rs/ignore).\n\n\n### Feature comparison\n\nAndy Lester, author of [ack](https://beyondgrep.com/), has published an\nexcellent table comparing the features of ack, ag, git-grep, GNU grep and\nripgrep: https://beyondgrep.com/feature-comparison/\n\nNote that ripgrep has grown a few significant new features recently that\nare not yet present in Andy's table. This includes, but is not limited to,\nconfiguration files, passthru, support for searching compressed files,\nmultiline search and opt-in fancy regex support via PCRE2.\n\n\n### Playground\n\nIf you'd like to try ripgrep before installing, there's an unofficial\n[playground](https://codapi.org/ripgrep/) and an [interactive\ntutorial](https://codapi.org/try/ripgrep/).\n\nIf you have any questions about these, please open an issue in the [tutorial\nrepo](https://github.com/nalgeon/tryxinyminutes).\n\n\n### Installation\n\nThe binary name for ripgrep is `rg`.\n\n**[Archives of precompiled binaries for ripgrep are available for Windows,\nmacOS and Linux.](https://github.com/BurntSushi/ripgrep/releases)** Linux and\nWindows binaries are static executables. Users of platforms not explicitly\nmentioned below are advised to download one of these archives.\n\nIf you're a **macOS Homebrew** or a **Linuxbrew** user, then you can install\nripgrep from homebrew-core:\n\n```\n$ brew install ripgrep\n```\n\nIf you're a **MacPorts** user, then you can install ripgrep from the\n[official ports](https://www.macports.org/ports.php?by=name\u0026substr=ripgrep):\n\n```\n$ sudo port install ripgrep\n```\n\nIf you're a **Windows Chocolatey** user, then you can install ripgrep from the\n[official repo](https://chocolatey.org/packages/ripgrep):\n\n```\n$ choco install ripgrep\n```\n\nIf you're a **Windows Scoop** user, then you can install ripgrep from the\n[official bucket](https://github.com/ScoopInstaller/Main/blob/master/bucket/ripgrep.json):\n\n```\n$ scoop install ripgrep\n```\n\nIf you're a **Windows Winget** user, then you can install ripgrep from the\n[winget-pkgs](https://github.com/microsoft/winget-pkgs/tree/master/manifests/b/BurntSushi/ripgrep)\nrepository:\n\n```\n$ winget install BurntSushi.ripgrep.MSVC\n```\n\nIf you're an **Arch Linux** user, then you can install ripgrep from the official repos:\n\n```\n$ sudo pacman -S ripgrep\n```\n\nIf you're a **Gentoo** user, you can install ripgrep from the\n[official repo](https://packages.gentoo.org/packages/sys-apps/ripgrep):\n\n```\n$ sudo emerge sys-apps/ripgrep\n```\n\nIf you're a **Fedora** user, you can install ripgrep from official\nrepositories.\n\n```\n$ sudo dnf install ripgrep\n```\n\nIf you're an **openSUSE** user, ripgrep is included in **openSUSE Tumbleweed**\nand **openSUSE Leap** since 15.1.\n\n```\n$ sudo zypper install ripgrep\n```\n\nIf you're a **RHEL/CentOS 7/8** user, you can install ripgrep from\n[copr](https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/):\n\n```\n$ sudo yum install -y yum-utils\n$ sudo yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/repo/epel-7/carlwgeorge-ripgrep-epel-7.repo\n$ sudo yum install ripgrep\n```\n\nIf you're a **Nix** user, you can install ripgrep from\n[nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/text/ripgrep/default.nix):\n\n```\n$ nix-env --install ripgrep\n```\n\nIf you're a **Flox** user, you can install ripgrep as follows:\n\n```\n$ flox install ripgrep\n```\n\nIf you're a **Guix** user, you can install ripgrep from the official\npackage collection:\n\n```\n$ guix install ripgrep\n```\n\nIf you're a **Debian** user (or a user of a Debian derivative like **Ubuntu**),\nthen ripgrep can be installed using a binary `.deb` file provided in each\n[ripgrep release](https://github.com/BurntSushi/ripgrep/releases).\n\n```\n$ curl -LO https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep_14.1.0-1_amd64.deb\n$ sudo dpkg -i ripgrep_14.1.0-1_amd64.deb\n```\n\nIf you run Debian stable, ripgrep is [officially maintained by\nDebian](https://tracker.debian.org/pkg/rust-ripgrep), although its version may\nbe older than the `deb` package available in the previous step.\n\n```\n$ sudo apt-get install ripgrep\n```\n\nIf you're an **Ubuntu Cosmic (18.10)** (or newer) user, ripgrep is\n[available](https://launchpad.net/ubuntu/+source/rust-ripgrep) using the same\npackaging as Debian:\n\n```\n$ sudo apt-get install ripgrep\n```\n\n(N.B. Various snaps for ripgrep on Ubuntu are also available, but none of them\nseem to work right and generate a number of very strange bug reports that I\ndon't know how to fix and don't have the time to fix. Therefore, it is no\nlonger a recommended installation option.)\n\nIf you're an **ALT** user, you can install ripgrep from the\n[official repo](https://packages.altlinux.org/en/search?name=ripgrep):\n\n```\n$ sudo apt-get install ripgrep\n```\n\nIf you're a **FreeBSD** user, then you can install ripgrep from the\n[official ports](https://www.freshports.org/textproc/ripgrep/):\n\n```\n$ sudo pkg install ripgrep\n```\n\nIf you're an **OpenBSD** user, then you can install ripgrep from the\n[official ports](https://openports.se/textproc/ripgrep):\n\n```\n$ doas pkg_add ripgrep\n```\n\nIf you're a **NetBSD** user, then you can install ripgrep from\n[pkgsrc](https://pkgsrc.se/textproc/ripgrep):\n\n```\n$ sudo pkgin install ripgrep\n```\n\nIf you're a **Haiku x86_64** user, then you can install ripgrep from the\n[official ports](https://github.com/haikuports/haikuports/tree/master/sys-apps/ripgrep):\n\n```\n$ sudo pkgman install ripgrep\n```\n\nIf you're a **Haiku x86_gcc2** user, then you can install ripgrep from the\nsame port as Haiku x86_64 using the x86 secondary architecture build:\n\n```\n$ sudo pkgman install ripgrep_x86\n```\n\nIf you're a **Void Linux** user, then you can install ripgrep from the\n[official repository](https://voidlinux.org/packages/?arch=x86_64\u0026q=ripgrep):\n\n```\n$ sudo xbps-install -Syv ripgrep\n```\n\nIf you're a **Rust programmer**, ripgrep can be installed with `cargo`.\n\n* Note that the minimum supported version of Rust for ripgrep is **1.72.0**,\n  although ripgrep may work with older versions.\n* Note that the binary may be bigger than expected because it contains debug\n  symbols. This is intentional. To remove debug symbols and therefore reduce\n  the file size, run `strip` on the binary.\n\n```\n$ cargo install ripgrep\n```\n\nAlternatively, one can use [`cargo\nbinstall`](https://github.com/cargo-bins/cargo-binstall) to install a ripgrep\nbinary directly from GitHub:\n\n```\n$ cargo binstall ripgrep\n```\n\n\n### Building\n\nripgrep is written in Rust, so you'll need to grab a\n[Rust installation](https://www.rust-lang.org/) in order to compile it.\nripgrep compiles with Rust 1.72.0 (stable) or newer. In general, ripgrep tracks\nthe latest stable release of the Rust compiler.\n\nTo build ripgrep:\n\n```\n$ git clone https://github.com/BurntSushi/ripgrep\n$ cd ripgrep\n$ cargo build --release\n$ ./target/release/rg --version\n0.1.3\n```\n\n**NOTE:** In the past, ripgrep supported a `simd-accel` Cargo feature when\nusing a Rust nightly compiler. This only benefited UTF-16 transcoding.\nSince it required unstable features, this build mode was prone to breakage.\nBecause of that, support for it has been removed. If you want SIMD\noptimizations for UTF-16 transcoding, then you'll have to petition the\n[`encoding_rs`](https://github.com/hsivonen/encoding_rs) project to use stable\nAPIs.\n\nFinally, optional PCRE2 support can be built with ripgrep by enabling the\n`pcre2` feature:\n\n```\n$ cargo build --release --features 'pcre2'\n```\n\nEnabling the PCRE2 feature works with a stable Rust compiler and will\nattempt to automatically find and link with your system's PCRE2 library via\n`pkg-config`. If one doesn't exist, then ripgrep will build PCRE2 from source\nusing your system's C compiler and then statically link it into the final\nexecutable. Static linking can be forced even when there is an available PCRE2\nsystem library by either building ripgrep with the MUSL target or by setting\n`PCRE2_SYS_STATIC=1`.\n\nripgrep can be built with the MUSL target on Linux by first installing the MUSL\nlibrary on your system (consult your friendly neighborhood package manager).\nThen you just need to add MUSL support to your Rust toolchain and rebuild\nripgrep, which yields a fully static executable:\n\n```\n$ rustup target add x86_64-unknown-linux-musl\n$ cargo build --release --target x86_64-unknown-linux-musl\n```\n\nApplying the `--features` flag from above works as expected. If you want to\nbuild a static executable with MUSL and with PCRE2, then you will need to have\n`musl-gcc` installed, which might be in a separate package from the actual\nMUSL library, depending on your Linux distribution.\n\n\n### Running tests\n\nripgrep is relatively well-tested, including both unit tests and integration\ntests. To run the full test suite, use:\n\n```\n$ cargo test --all\n```\n\nfrom the repository root.\n\n\n### Related tools\n\n* [delta](https://github.com/dandavison/delta) is a syntax highlighting\npager that supports the `rg --json` output format. So all you need to do to\nmake it work is `rg --json pattern | delta`. See [delta's manual section on\ngrep](https://dandavison.github.io/delta/grep.html) for more details.\n\n\n### Vulnerability reporting\n\nFor reporting a security vulnerability, please\n[contact Andrew Gallant](https://blog.burntsushi.net/about/).\nThe contact page has my email address and PGP public key if you wish to send an\nencrypted message.\n\n\n### Translations\n\nThe following is a list of known translations of ripgrep's documentation. These\nare unofficially maintained and may not be up to date.\n\n* [Chinese](https://github.com/chinanf-boy/ripgrep-zh#%E6%9B%B4%E6%96%B0-)\n* [Spanish](https://github.com/UltiRequiem/traducciones/tree/master/ripgrep)\n","funding_links":["https://github.com/sponsors/BurntSushi"],"categories":["Install Vundle","Linux Tools","Rust","Uncategorized","Data Search/Filtering","Text","Files and Directories","cli","Text utils","Command line - Linux","Vulnerability Assessment","HarmonyOS","Command Line Utilities","DFIR Hunt for keywords in files (No SIEM)","Config files","Applications","Rust (6)","Linux","grep","\u003ca name=\"core\"\u003e\u003c/a\u003ecore","Applications written in Rust","Command Line Tools","Tech","Productivity Tools","Linux System Tools","Text Processing","Rust (42)","Command Line","语言资源库","其他","Other Lists","grep, ack, ag, rg","Tools","Miscellaneous Tools","开源工具","System \u0026 Command","Core Components","Awesome Tools","Grep Replacement","Tools and Plugins","Programming Languages","Command-Line Productivity","Table of Contents","命令行工具","Developer Tools","\\*nix/\\*nux","\u003ca name=\"text-search\"\u003e\u003c/a\u003eText search (alternatives to grep)","Productivity tools","⚡ Productivity","Projects","rust","Command-line","Tools \u0026 Services","my-ubuntu","Search","工具","Forensics","Text Processor","Linux生态圈Dev\u0026Ops工具与服务","Modern Unix Replacements","\u003ca id=\"software\"\u003e\u003c/a\u003eSoftware","Grep-like tools","Productivity and Workflow Tools","Table of contents"],"sub_categories":["Caveats","Uncategorized","Visual Studio Code","Search","Multiplexers","Learning resources","Static Code Auditing","Windows Manager","Tools","Other awesome lists for detection","ripgrep","Text processing","Terminal utils","File \u0026 Directory Tools","Dependency Management","rust","网络服务_其他","🛡️ DFIR:","Example","Rust","命令行工具","Other","Terminal Tools","Open USP Tsukubai","Windows","Terminal Utilities","Command line","collection","Command Line Tools","Searching","Chess :chess_pawn:","Useful Linux Tools","CLI Tools","Individual Episodes","多模态","CLI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBurntSushi%2Fripgrep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBurntSushi%2Fripgrep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBurntSushi%2Fripgrep/lists"}