|
Line count for compressed files
Hi All,
I have requirement to count the number of records in a zipped file (*.gz) without decompressing it. I am using the following (I am unzipping to stdout and counting)
gzcat <filename>.gz |wc -l (same as gunzip -c)
I am trying to see if there is a faster and less resource consuming approach as I would be doing this on a huge set of files every day. Your help is highly appreciated.
Thanks.
-S
|