There are several formats of tar archives, ustar
, gnu
, etc. Is there some tool that can show which format a given archive is in? (Haven't found it in manpage of bsdtar
nor in info pages of GNU tar).
2 Answers
As @FreudianSlip mentioned in the comments you can use file
on an unix command line to check the format.
$ file archive.tar
archive.tar: POSIX tar archive (GNU)
-
This can be used to differentiate GNU vs POSIX, but not USTAR. The reported format for USTAR is identical to that of POSIX.– mtalexanCommented May 6 at 17:27
Use 7Zip to open it then click Info
button.
It will show information about compression methods and so on.
By far 7Zip isn't the only program which can do it (it's my choice because it's open source and free), a lot of archivers can do the same.
-
That's good to know, but for home I'd really like a way that doesn't require me to first go out buying a license for an OS I don't particularly like :)– MagnusCommented May 27, 2014 at 18:15
-
-
I'm on Linux and I have the CLI version of
7z
installed, but it offers no way to extract that information AFAICS.– MagnusCommented May 30, 2014 at 19:44
tar --help
I find out that it defaults to "--format=gnu". The generated file is not accepted on hackage.haskell.org with the message that it isn't inustar
format.