How to determine a tar archive's format
问题 In Linux, how can I determine the format which was used to create a given tarball? I'd like to detect whether a given archive was created using posix or gnu format. I've already read the man page for GNU tar, which explains how to control the format during creation. However, I don't see anything about how to view the format of an existing file. 回答1: You can use file under Linux to look at the fingerprint of the uncompressed archive (file won't peer beyond the compression layer, so decompress