Universal grep

High-performance file search utility. Offers easy options and predefined regex patterns to quickly search source code, Unicode text, binary, tarballs (cpio, tar, and pax), and compressed files. A more capable, super fast, fully compatible drop-in replacement for GNU/BSD grep.

What people are saying about ugrep

"Impressive work! And thanks for an amazing writeup, again! This is already my go to search-tool, and it just keeps on getting better. Well done." -RuneBergh on GitHub

"Many thanks for your prompt help. And congratulations on an impressively-featured utility." -ISO8807 on GitHub

"ugrep is by far the fastest grep for searching compressed logs now. Impressive." -RuneBergh on GitHub

What is ugrep?

ugrep is fully compatible with the popular BSD and GNU grep utilities. But ugrep has much more to offer than these and other grep utilities:

Open source licenseBSDGPLBSD
Super fast parallel search with threads and mmapyesnono
Unicode text search (UTF-8, UTF-16, UTF-32)yesnono
Use predefined patterns to quickly search source codeyesnono
Search files by file types, e.g. scripts and source codeyesnono
Search files while ignoring files specified in .gitignoreyesnono
Search files stored in cpio, tar, pax, and zip archivesyesnono
Search compressed files (.gz, .Z, .zip, .bz, .bz2, .lzma, .xz)yesno.gz
Search documents (pdf, doc, docx, etc.) using filtersyesnono
Search binary files and output hexdumps for matchesyesnono
Custom output options (CSV, JSON, XML)yesnono
User-specified custom output formattingyesnono
Search files by filename extensions and magic bytesyesnono
Use gitignore-style globs to select files to searchyesnono
Match patterns across newlinesyesnono
Skip unwanted matches with negative patternsyesnono
Match replacement with backreferencesyesnono
Supports encodings ISO-8859-1, CP850, EBCDIC, KOI8, etc.yesnono

User Guide and Download Instructions

To view the user guide and the ugrep download instructions, please visit ugrep at GitHub.