A Gzip file is a binary file and getting a line count is worthless. What are you actually trying to do? Are you attempting to get the size of the file? (ls -la xyz.gz), Are you seeing if it is different from before (cksum xyz.gz) What exactly are you trying to do by using the wc command
Bill
Lead Application Developer
New York State, USA
As already mentioned, a Gzip file is a compressed binary file. The "[tt]wc -l[/tt]" command is trying to find lines in a text file. You won't get anything meaningful.
If you want to know how many files are in the [tt].gz[/tt] file, these commands can do that...
If two files are EXACTLY the same, then their compressed (gz) files should be exactly the same, and the wc command should return exactly the same result. If even 1 byte changes in the file, the wc command could return a different result for each file.
==================================
advanced cognitive capabilities and other marketing buzzwords explained with sarcastic simplicity
yes cmp will work just fine. The reason that I use cksum almost exclusively is that I store the checksums into a database so that I can make sure that all duplicates never get passed.
Bill
Lead Application Developer
New York State, USA
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.