LinuxCommandLibrary

ug

Interactive ugrep pattern search alias

TLDR

Search pattern

$ ug "[pattern]" [file]
copy
Search recursively
$ ug -r "[pattern]"
copy
Case insensitive
$ ug -i "[pattern]" [file]
copy
Show line numbers
$ ug -n "[pattern]" [file]
copy
Interactive mode
$ ug -Q "[pattern]"
copy
Count matches
$ ug -c "[pattern]" [file]
copy

SYNOPSIS

ug [-i] [-r] [-n] [-Q] [options] pattern [files]

DESCRIPTION

ug is the interactive query alias for ugrep, a fast pattern search tool. When invoked as ug, it launches ugrep's interactive query UI by default, allowing real-time search refinement as you type the pattern.
The interactive mode displays results instantly and updates as the query changes, making it useful for exploratory code searching. It supports the same extensive feature set as ugrep including Boolean queries, fuzzy matching, and searching within archives.
See ugrep for full documentation of search options and capabilities.

PARAMETERS

-i

Case insensitive.
-r
Recursive search.
-n
Line numbers.
-Q
Interactive query.
-c
Count matches.
-l
Files only.

CAVEATS

Alias for ugrep. Features vary by build. Fast but different.

HISTORY

ug is typically an alias or symlink to ugrep, a fast grep alternative with interactive features.

SEE ALSO

ugrep(1), grep(1), rg(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community