tar command on does not automatically detect the compression type of an archive

Solution Verified - Updated -

Issue

Extracting files from an archive, or inspecting the contents of an archive fail when

  • the archive is compressed
  • the archive is very small
  • and the compression type is not explicitly specified, so autodetect functionality is attempting to be used

The commands for extracting/inspecting are tar tfv <filename> or tar xfv <filename>. Following error message (or localized equivalents) are output:

 tar: This does not look like a tar archive
 tar: Exiting with failure status due to previous errors

Environment

  • Red Hat Enterprise Linux (RHEL), all versions below 7.5GA
  • tar
  • compression

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content