Forrest logo
back to the ugrep tool

ugrep:tldr:704e4

ugrep: Search in all files in the current directory recursively and print the name of each matching file.
$ ugrep --files-with-matches "${search_pattern}"
try on your machine

The command "ugrep --files-with-matches "${search_pattern}"" is used to search for files that contain the specified search pattern. Here's a breakdown of the different components:

  • "ugrep" is the name of the command being used. It is usually a more advanced version of the "grep" command, offering additional functionalities and options.
  • "--files-with-matches" is an option that instructs ugrep to display only the filenames of the files that contain a match for the search pattern. It eliminates the actual matching lines from the output.
  • "${search_pattern}" is a placeholder for the pattern you want to search for. It can be a string, regular expression, or any other valid search pattern.

When this command is executed, ugrep will recursively search for files in the current directory and its subdirectories. For each file that contains a match for the given search pattern, only the filename will be displayed in the output.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ugrep tool