低レベルのファイル形式を決定するには?

低レベルのファイル形式を決定するには?

file(1)、特定のファイルを参照するときは、「Debian Binary Package(Format 2.0)」*.debまたは「OpenDocument Text」などを意味します*.odt。使用する低レベルのアーカイブの種類を決定する方法があります。たとえば、次のようになります。アルDebianパッケージまたはOpenDocumentファイル用のZIP用。

これをどのように決定できますか?

ベストアンサー1

使用7z 16.02または、後でlp7zipの(リスト)オプションを使用します.

以下は、出力のいくつかの例です。

オート:

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
(..)

デップ:

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
(..)

回転速度:

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
(..)

非保管:

(..)
ERROR: test.sh : Can not open the file as archive

おすすめ記事