tar command on does not automatically detect the compression type of an archive
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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
