ugrep
A fast grep-compatible file search tool with Unicode, multiline and fuzzy matching, interactive queries, archive search and JSON or CSV output.
Fast search with explicit scope
ugrep supports common GNU and BSD grep patterns while adding Unicode, multiline, fuzzy and boolean queries, an interactive TUI, archive search and structured output. ugrep suits repeatable scripts; ug is oriented toward interactive work.
Configuration can change results
ug may load .ugrep configuration from the working or user directory. Batch jobs should use explicit arguments and a known working directory so a project-local configuration does not silently widen the search.
External filters and sensitive output
Document filters can invoke other programs, and nested archives can consume substantial resources. Restrict directories and file types, and review results for tokens, private keys or personal data before storing or sharing logs.
Save to your cloud drive
Open the cloud drive to get the file directly, or save it for convenient access on another device.
Quark Cloud Drive
RecommendedSave ugrep to this cloud drive
Baidu Netdisk
Save ugrep to this cloud drive
ugrep recursive search and result review
Start with a fixed string in a small test directory, then add recursion, file globs, regular expressions and archive options one at a time.
Before you start
- Prepare a small test tree containing UTF-8 text, Windows line endings and a few binary or archive samples.
- Define directories, extensions, hidden files and ignore rules that belong in the search scope.
- Use explicit ugrep arguments in automation instead of depending on an unknown `.ugrep` file.
Installation steps
- 01
Extract the Windows archive
Verify ugrep 7.8.3 and the Windows x64 archive, then preserve the ugrep and ug executable names in a controlled directory.
- 02
Inspect help and version
Confirm fixed strings, regular expressions, globs, ignore rules, archive search and output formats available in the current build.
- 03
Establish a small scope
Search one test directory and one file type first, checking Windows quoting and escaping before using a complex pattern.
Quick start
- 01
Search a fixed string
Show filenames and line numbers for a literal pattern, then verify case, encoding, line endings and Unicode behavior.
- 02
Add recursion and exclusions
Use recursive search with file globs while excluding build, dependency, cache and sensitive directories.
- 03
Add interactive or archive search
Use the TUI or archive option only on trusted samples, with limits on archive depth and result volume.
Usage tips
- Windows terminals usually use double quotes; test complex regular expressions on a small sample first.
- The `ug` configuration file can alter scope and filters; batch commands should be explicit and reproducible.
- External filters can expose secrets or personal data in output, so review logs before uploading them.
Troubleshooting and uninstall
Why is a known string not found?
Check case, encoding, hidden files, ignore rules, globs and binary handling, then reduce the search to one file.
Why is archive or document search slow?
Limit directories, file types and nested depth, and disable filters that are not needed for the current sample.
- Remove the tool and configuration referencesCheck PATH, editor tasks and scripts for ugrep calls, then delete the extracted directory and review user or project `.ugrep` files.
Frequently asked questions
How does ugrep extend ordinary grep?
It keeps common grep patterns and adds Unicode, multiline, fuzzy and boolean queries, interactive search, archive support and structured output.
What is the difference between ug and ugrep?
`ug` is interactive and may load `.ugrep` configuration, while `ugrep` is better suited to explicit batch commands.
Can ugrep search PDF or DOCX files directly?
Document search may use external filters that convert content, so inspect the configured programs and restrict them to trusted samples.
What should be excluded from a repository search?
Exclude build output, dependencies, caches, credentials, private keys and other generated or sensitive directories unless a controlled audit requires them.