Possible Duplicate:
Find recursively all archive files of diverse archive formats and search them for file name patterns
I need to search for a file in all zip files in a directory.
Is there a tool like find
that be able to search in ZIP files?
I tried this:
find /path/ -iname '*.zip' -print -exec unzip -l {} \; |grep -i '<filename>'
But this only prints path of file in zip file and not the zip file name itself!
Thanks
for f in *.zip; do echo "$f: "; less $f | grep <filename>; done
, according to: https://superuser.com/questions/216617/view-list-of-files-in-zip-archive-on-linux – Mladen B. Jun 25 '22 at 16:36