Utility for searching and listing files in zip archives. This saves a lot of trouble and space extracting, especially in the case of nesting (such as for example in .ear, .war) files, where extraction would otherwise be necessary, even to list the contents, let alone to search for text.
This tool is available as a downloadable JAR file, and runs from the command line. To install, just click on the download link above and save the file to your computer. The documentation below has usage information, as well as some examples.
java -jar zipgrep.jar [-h | --help] [-list] [-debug] [-no-recurse] file [pattern]
file Archive to search
-h, --help show this help message and exit
-list Do we want to just list the archive? (default false)
-debug Will show debug trace (default false) and processors (with help option)
-no-recurse Prevent recursion of nested archives? (recursion happens by default)
pattern Search (regex) pattern - if searching required
- List entries in foo.zip recursively:
java -jar zipgrep.jar -list foo.zip
- Search foo.zip recursively and find string 'findme' in any of its entries:
java -jar zipgrep.jar foo.zip findme
- Show help options, archive extensions and entry processors in use:
java -jar zipgrep.jar -h -debug