1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-06 04:35:23 +02:00
tldr/pages/common/ugrep.md

37 lines
1.2 KiB
Markdown
Raw Normal View History

2022-06-26 14:48:35 -04:00
# ugrep
> Ultra fast search tool with query TUI.
> More information: <https://github.com/Genivia/ugrep>.
- Start a query TUI to search files in the current directory recursively (`<Ctrl z>` for help):
2022-06-26 14:48:35 -04:00
`ugrep {{[-Q|--query]}}`
2022-06-26 14:48:35 -04:00
- Search the current directory recursively for files containing a regex search pattern:
`ugrep "{{search_pattern}}"`
- Search in a specific file or in all files in a specific directory, showing line numbers of matches:
`ugrep {{[-n|--line-number]}} "{{search_pattern}}" {{path/to/file_or_directory}}`
2022-06-26 14:48:35 -04:00
- Search in all files in the current directory recursively and print the name of each matching file:
`ugrep {{[-l|--files-with-matches]}} "{{search_pattern}}"`
2022-06-26 14:48:35 -04:00
- Fuzzy search files with up to 3 extra, missing or mismatching characters in the pattern:
`ugrep {{[-Z|--fuzzy=]}}{{3}} "{{search_pattern}}"`
2022-06-26 14:48:35 -04:00
- Also search compressed files, Zip and tar archives recursively:
2022-06-26 14:48:35 -04:00
`ugrep {{[-z|--decompress]}} "{{search_pattern}}"`
2022-06-26 14:48:35 -04:00
- Search only files whose filenames match a specific glob pattern:
`ugrep {{[-g |--glob=]}}"{{glob_pattern}}" "{{search_pattern}}"`
2022-06-26 14:48:35 -04:00
- Search only C++ source files (use `--file-type=list` to list all file types):
`ugrep {{[-t |--file-type=]}}cpp "{{search_pattern}}"`