Use 7z
16.02 ou posterior com a opção l
(list) de p7zip
Aqui estão alguns exemplos de saídas:
odt :
7z l test.odt
(..)
Scanning the drive for archives:
1 file, 20969 bytes (21 KiB)
Listing archive: test.odt
--
Path = test.odt
Type = zip
Physical Size = 20969
(..)
deb :
7z l test.deb
(..)
Scanning the drive for archives:
1 file, 47320946 bytes (46 MiB)
Listing archive: test.deb
--
Path = test.deb
Type = Ar
Physical Size = 47320946
SubType = deb
----
Path = data.tar.xz
Size = 47310792
Modified = 2017-03-09 00:04:52
Mode = -rw-r--r--
--
Path = data.tar.xz
Type = xz
Physical Size = 47310792
Method = LZMA2:26 CRC32
Streams = 1
Blocks = 1
(..)
rpm :
7z l test.rpm
(..)
Scanning the drive for archives:
1 file, 80356 bytes (79 KiB)
Listing archive: test.rpm
--
Path = test.rpm
Type = Rpm
Physical Size = 80356
Headers Size = 7726
CPU = x86_64
Host OS = linux
Created = 2016-06-06 11:01:01
----
Path = test.cpio.gz
Size = 72630
Created = 2016-06-06 11:01:01
--
Path = test.cpio.gz
Type = gzip
Headers Size = 10
(..)
tgz:
7z l test.tgz
Scanning the drive for archives:
1 file, 25617349 bytes (25 MiB)
Listing archive: test.tgz
--
Path = test.tgz
Type = gzip
Headers Size = 10
(..)
não-arquivos:
(..)
ERROR: test.sh : Can not open the file as archive