1

How to grep a bz2 file that is further under a zip folder - Ex: I have a work.zip folder inside which i got a couple of XXX.bz2 files which have a pattern i am searching for. I want to avoid unzipping the parent folder, is there a way?

2
  • If you are searching for names, zip -sf work.zip will give you that, but if you want to search for contents, you're going to have to unzip the archive Commented Mar 9, 2017 at 3:53
  • 1
    unzip -p archive.zip | bzgrep 'regex'? Commented Mar 9, 2017 at 6:29

1 Answer 1

0

Try ugrep with options -z and --zmax=2 to search 2 dearchiving/decompression levels deep, such as grepping bz2 files in a zip file.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.