How do I search rar files? #497
-
|
See title. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Use $ ug -W --filter="rar:unrar p -inul %" <OPTIONS> <PATTERN> ...If you only want to search .rar files on a path: $ ug -W -Orar --filter="rar:unrar p -inul %" <OPTIONS> <PATTERN>Note that the |
Beta Was this translation helpful? Give feedback.
Use
--filterto search rar as a whole entity. It's not perfect with details such as line numbers and file names, but it will find matches in a rar. The following examples search the rar data and also searches anything else that is on the search path:$ ug -W --filter="rar:unrar p -inul %" <OPTIONS> <PATTERN> ...If you only want to search .rar files on a path:
$ ug -W -Orar --filter="rar:unrar p -inul %" <OPTIONS> <PATTERN>Note that the
-Woption prevents "binary file" detection and warnings, so you always get matches even when the archive contains binary files. If a match is in a binary file or part that spans a line, then the output is in hex when matching lines to output.