Determine whether a particular file is compressed

command linecompressionfiles

How to know in Linux whether a particular file is compressed or not using a command?

Best Answer

You may try using file, for example:

$ file test.sh.gz
test.sh.gz: gzip compressed data, was "test.sh", from Unix, last modified: Wed Feb  6 14:35:33 2013