trendstotal.blogg.se

Search in zip files
Search in zip files









search in zip files

The AVFS filesystem presents a view of the filesystem where every archive file /path/to/foo.zip is accessible as a directory ~/.avfs/path/to/foo.zip#. To make it work across multiple files put it in a loop: for i in *.zip You can of course try to just grep -a the zip files but depending on the content of the file and your pattern, you might get false positives and/or false negatives.

search in zip files

to memory) instead of decompressing the files to disk. This way you are only decompressing to stdout (ie.

search in zip files

If ( unzip -c "$file" | grep -q "ORA-1680") then If you need just the list of matching zip files, you can use something like: for file in *.zip do Since zipgrep is only a shellscript, wrapping unzip and egrep itself, you might just as well do it manually: for file in *.zip do unzip -c "$file" | grep "ORA-1680" done It is in general not possible to search for content within a compressed file without uncompressing it one way or another.











Search in zip files