Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Agent Ransack to grep entire directories. But it doesn't unzip JAR files before looking into them, is there any tool that does that?

share|improve this question
1  
find / -iname "*.jar" -print0 | xargs -0 -n 1 unzip -p | grep … – richard Sep 27 '12 at 22:58
up vote 1 down vote accepted

Try using unzip:

unzip -p your_file.jar | grep "your_search"

From the man page:

-p     extract files to pipe (stdout).  Nothing but the file data is sent to
       stdout, and the files are always extracted in binary format, just as
       they are stored (no conversions).
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .