bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Detecting compressed archives from stdin


From: Michael B. Trausch
Subject: [Bug-tar] Detecting compressed archives from stdin
Date: Fri, 01 Feb 2008 17:40:27 -0500

When piping a compressed archive to tar, it does not automatically
detect and subsequently take appropriate decompression action.

For example:

address@hidden:~/ubuntu/gnu-tar/tar-1.18/src$ wget -q -O-
http://ftp.gnu.org/gnu/tar/tar-1.19.tar.gz|tar xf -
tar: Archive is compressed. Use -z option
tar: Error is not recoverable: exiting now

or:

address@hidden:~/ubuntu/gnu-tar/tar-1.18/src$ wget -q -O-
http://ftp.gnu.org/gnu/tar/tar-1.19.tar.bz2|tar xf -
tar: Archive is compressed. Use -j option
tar: Error is not recoverable: exiting now

However, if the archive is stored on disk and specified on the
command-line, it works without this error message.  Obviously it can
detect the format when the data is piped in; shouldn't there be a way to
decompress while untarring?  After all, the following works:

address@hidden:~/ubuntu/gnu-tar/tar-1.18/src$ wget -q -O-
http://ftp.gnu.org/gnu/tar/tar-1.19.tar.bz2|bzip2 -d|tar xvf -
tar-1.19/
tar-1.19/build-aux/
tar-1.19/build-aux/compile
tar-1.19/build-aux/config.guess
[extra output removed]

        Thanks!
        Mike Trausch

-- 
Michael B. Trausch                                   address@hidden
home: 404-592-5746, 1                                 www.trausch.us
cell: 678-522-7934                       im: address@hidden, jabber
Ubuntu Unofficial Backports Project:    http://backports.trausch.us/

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]