← 返回命令列表

Linux command

ugrep 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Search pattern

ugrep "[pattern]" [file]

Recursive search

ugrep -r "[pattern]"

Interactive mode

ugrep -Q "[pattern]"

Search archives

ugrep -z "[pattern]" [archive.zip]

Boolean query

ugrep "[word1] AND [word2]"

Fuzzy matching

ugrep -Z "[pattern]" [file]

说明

ugrep is a high-performance text search tool designed as a modern replacement for grep with extended capabilities. It provides an interactive query mode with real-time results, Boolean search operators (AND, OR, NOT), fuzzy matching for approximate patterns, and the ability to search inside compressed archives and binary files. The tool is grep-compatible and supports POSIX, Perl, and fixed-string pattern syntax. It can search recursively through directories with file type filtering, output results in various formats including JSON and CSV, and display context around matches. Archive searching handles ZIP, tar, gzip, bzip2, and other compressed formats transparently. The interactive query UI (invoked via the ug alias) allows refining searches in real time.

参数

-r
Recursive.
-Q
Interactive TUI.
-z
Search archives.
-Z
Fuzzy matching.
-i
Case insensitive.
--bool
Boolean queries.

FAQ

What is the ugrep command used for?

ugrep is a high-performance text search tool designed as a modern replacement for grep with extended capabilities. It provides an interactive query mode with real-time results, Boolean search operators (AND, OR, NOT), fuzzy matching for approximate patterns, and the ability to search inside compressed archives and binary files. The tool is grep-compatible and supports POSIX, Perl, and fixed-string pattern syntax. It can search recursively through directories with file type filtering, output results in various formats including JSON and CSV, and display context around matches. Archive searching handles ZIP, tar, gzip, bzip2, and other compressed formats transparently. The interactive query UI (invoked via the ug alias) allows refining searches in real time.

How do I run a basic ugrep example?

Run `ugrep "[pattern]" [file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r do in ugrep?

Recursive.