[Top][All Lists]

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

Re: [Bug-tar] tar ignores files called "http:*"

From: Eric Blake
Subject: Re: [Bug-tar] tar ignores files called "http:*"
Date: Thu, 29 May 2014 15:43:28 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/28/2014 04:28 PM, matthew green wrote:
> hi folks.
> i've found that when i have a file pathname that looks like a http URL,
> GNU tar incorrectly tries to open a http connection instead of reading
> the file on my disk.  eg:
>    myhost /var/tmp> tar xzpf http://hostname.here/file/path/here.tgz
>    tar (child): Cannot connect to http: resolve failed

It's more than just leading http, it's ANY pathname with a leading
string that could be a hostname followed by a colon.  And this is a
feature, not a bug - use the --force-local command-line option to turn
it off, and meanwhile read this portion of the info pages:

   To specify an archive file on a device attached to a remote machine,
use the following:


'tar' will set up the remote connection, if possible, and prompt you for
a username and password.  If you use 'address@hidden:/DEV/FILE-NAME',
'tar' will attempt to set up the remote connection using your username
as the username on the remote machine.

   If the archive file name includes a colon (':'), then it is assumed
to be a file on another machine.  If the archive file is
'address@hidden:FILE', then FILE is used on the host HOST.  The remote host
is accessed using the 'rsh' program, with a username of USER.  If the
username is omitted (along with the '@' sign), then your user name will
be used.  (This is the normal 'rsh' behavior.)  It is necessary for the
remote machine, in addition to permitting your 'rsh' access, to have the
'rmt' program installed (this command is included in the GNU 'tar'
distribution and by default is installed under 'PREFIX/libexec/rmt',
where PREFIX means your installation prefix).  If you need to use a file
whose name includes a colon, then the remote tape drive behavior can be
inhibited by using the '--force-local' option.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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