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?

  • 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 – Fox Mar 9 '17 at 3:53
  • 1
    unzip -p archive.zip | bzgrep 'regex'? – Cyrus Mar 9 '17 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.