Skip to content
Discussion options

You must be logged in to vote

Use --filter to 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 -W option 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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by genivia-inc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant