Everywhere All articles Download

Finding specific things

Looking inside archives

Updated 2026-07-31 · 4 min read

Neither Spotlight nor Finder looks inside a zip. The command line does, without extracting.

List a zip without extracting

unzip -l archive.zip
unzip -l archive.zip | grep -i invoice

Search inside every zip in a folder

for z in *.zip; do
  echo "== $z"
  unzip -l "$z" | grep -i "invoice"
done

Extract one file

unzip -j archive.zip "path/inside/file.pdf" -d ~/Desktop

-j flattens the directory structure so the file lands directly in the destination.

tar archives

tar -tf archive.tar.gz | grep -i invoice
tar -xzf archive.tar.gz path/inside/file.pdf

Disk images

hdiutil attach -nobrowse -readonly image.dmg
find /Volumes/ImageName -iname "*invoice*"
hdiutil detach /Volumes/ImageName

-nobrowse keeps it out of Finder's sidebar while you look.

Searching contents rather than names

unzip -p archive.zip "*.txt" | grep -i "search term"

-p streams a file to stdout without writing it to disk.

Why search tools do not do this

Indexing archive contents means decompressing everything, and an archive can contain an archive. Storing that expands the index enormously for a case most people meet rarely, which is why essentially no search tool does it and the command line remains the answer.

Common questions

Can Spotlight search inside zip files?

No. It indexes the archive as one item. Use unzip -l to list contents.

How do I search a dmg without opening it in Finder?

hdiutil attach -nobrowse -readonly, search the mounted path, then hdiutil detach.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Download for Mac

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Articles Privacy Support