我使用 Agent Ransack 來 grep 整個目錄。但在查看 JAR 檔案之前它不會解壓縮它們,有沒有任何工具可以做到這一點?
答案1
嘗試使用unzip
:
unzip -p your_file.jar | grep "your_search"
從man
頁面:
-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).