published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted at 24. Aug '21
Howto List Files in Tarball
tar is stream packer and won’t store index of files present (by default) in a archive like ZIP. So it must be scanned through to get content. You can decompress the archive or decompress it to /dev/null.
tar -tvzf my_tar.tar.gz >/dev/null gunzip -c file.tar.gz | tar t > /dev/null