ZIPGREP(1L)
π ZIPGREP (1L) β ok so this is zipgrep, bestie
NAME
zipgrep β search the files inside a ZIP archive for lines that match a pattern π¦
SYNOPSIS
zipgrep [egrep_options] pattern file[.zip] [file(s) ...]
[-x xfile(s) ...]
DESCRIPTION
okay so here's the vibe: zipgrep digs through the files inside a ZIP archive and hunts for lines that match the string or pattern you give it. π₯
Real talk though β zipgrep is a shell script, not some compiled binary, so it literally cannot function without egrep(1) and unzip(1L) doing the heavy lifting. And the output? Identical to what egrep(1) gives you. No cap, same energy. β¨
ARGUMENTS
patternβ the thing you're looking for inside the ZIP archive. Any string or regular expression thategrep(1)accepts is fair game, so go off. πfile[.zip]β the path of the ZIP archive. Heads up though: wildcard expressions for the ZIP archive name are not supported, so don't try it. π If the literal filename isn't found, the suffix.zipgets appended for you β cute, right? And self-extracting ZIP files work just like any other ZIP archive; you just have to specify the.exesuffix (if there is one) explicitly.[file(s)]β an optional list of archive members to process, separated by spaces. Skip this and all members of the ZIP archive get searched. π You can use regular expressions (wildcards) to match multiple members:*β matches a sequence of 0 or more characters?β matches exactly 1 character[...]β matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret (!or^) follows the left bracket, then the range of characters within the brackets is complemented (that is, anything except the characters inside the brackets is considered a match).
Be sure to quote any character that might otherwise be interpreted or modified by the operating system. Like, fr fr, quote it or the shell will eat it. π
[-x xfile(s)]β an optional list of archive members to exclude from processing. This one's iconic because wildcard characters match directory separators (/), which means you can use it to exclude any files that are in subdirectories. For example,zipgrep grumpy foo *.[ch] -x */*would search for the stringgrumpyin all C source files in the main directory of thefooarchive, but none in any subdirectories. Without the-xoption, all C source files in all directories within the zipfile would be searched. π«Ά
β¨ OPTIONS β¨
All options prior to the ZIP archive filename are passed to egrep(1). That's it. That's the whole rule. π
SEE ALSO
egrep(1), unzip(1L), zip(1L), funzip(1L), zipcloak(1L), zipinfo(1L), zipnote(1L), zipsplit(1L) β the whole friend group π§
URL
The Info-ZIP home page is currently at
http://www.info-zip.org/pub/infozip/
or
ftp://ftp.info-zip.org/pub/infozip/
AUTHORS
zipgrep was written by Jean-loup Gailly. π main character energy
okay that's the whole page, ily, go grep something π
this was brought to you by Info-ZIP, dated 20 April 2009, and yeah the page is literally called ZIPGREP(1L) β slay π
π¦ where this page comes from
- alpine 3.22: unzip-doc 6.0-r15 Β· custom
- alpine 3.23: unzip-doc 6.0-r16 Β· custom
- alpine 3.24: unzip-doc 6.0-r16 Β· custom
- arch rolling: unzip 6.0-23 Β· custom
- centos-stream 10: unzip 6.0-69.el10 Β· Info-ZIP
- centos-stream 9: unzip 6.0-59.el9 Β· BSD
- fedora 43: unzip 6.0-67.fc43 Β· Info-ZIP
- fedora 44: unzip 6.0-69.fc44 Β· Info-ZIP
- nixos 26.05: unzip 6.0
- nixpkgs unstable: unzip 6.0
- opensuse-leap 16.0: unzip-doc 6.00-160000.2.2 Β· BSD-3-Clause
- Copyright (c) 1990-2009 Info-ZIP. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms