zfgrep:tldr:f20cc
zfgrep: List only filenames whose content matches the search string at least once.
$ zfgrep --files-with-matches ${search_string} ${filename1 filename2 ---}
try on your machine
This command searches for lines in the specified files (filename1, filename2, etc.) that contain the ${search_string} and returns only the names of the files that have at least one match.
Here is a breakdown of the command:
- zfgrep: This is the command itself, which stands for "zipped fgrep" and is used to search for text patterns in compressed files.
- --files-with-matches: This option tells zfgrep to only display the names of the files that have matching lines and not the lines themselves.
- ${search_string}: This is a placeholder variable that should be replaced with the actual text or pattern you want to search for.
- ${filename1 filename2 ---}: These are the filenames or paths of the files you want to search within. Replace "filename1", "filename2", etc., with the actual names of the files you want to search.
To use this command, replace "${search_string}" with the specific text or pattern you want to find, and replace "${filename1 filename2 ---}" with the names or paths of the files you want to search in.
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.