简体   繁体   中英

How to use grep command on zip files

I want to grep for today's date from zip file. How can do this?

I have a zip file called sen2616.z I want to get all the data for today's date 09.02.2014

In my case zgrep didn't work on a normal .zip file. I had to use zipgrep instead.

Please use zipgrep .

zgrep is for gz files, not for zip files.

You can use zgrep to get what you want, with:

zgrep '09.02.2014' myfile.zip

See man zgrep for more info.

zipgrep will work with zip files only. If you want to grep all files, not only zipped files, then you could use ugrep , which allows to do that with -z flag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM