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
Unfortunately, grep doesn't work on compressed files. To overcome this, people usually advise to first uncompress the file(s), and then grep your text, after that finally re-compress your file(s)… You don't need to uncompress them in the first place. You can use zgrep on compressed or gzipped files.
If you want to grep all files, not only zipped files, then you could use ugrep, which allows to do that with -z flag.
You need to use zgrep command which invokes grep on compressed or gzipped files. All options specified are passed directly to the grep command or egrep command.
Please use zipgrep
.
zgrep
is for gz files, not for zip files.
In my case zgrep
didn't work on a normal .zip
file. I had to use zipgrep
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With