| ||Gnu tar happily connects to remote hosts, depending on filename|
9 points by fooyc on Sept 17, 2013 | hide | past | web | favorite | 5 comments |
|Today I Learned:|
Apparently the ":" in the filename tells tar to connect to "wtf" using the "rsh" command (aliased to "ssh").
$ tar xvzf wtf:foo.tar
tar (child): Cannot connect to wtf: resolve failed
There is no mention of this in the man page: http://linuxcommand.org/lc3_man_pages/tar1.html ; apart from the rather surprising --rsh-command and --rmt-command options.
This actually is documented in the "info" pages:
Isn't it dangerous that a random filename could trigger "tar" to connect to remote hosts ?
Use archive file or device file on hostname.
If the file name contains a ‘:’, it is interpreted as ‘hostname:file
name’. If the hostname contains an at sign (‘@’), it is treated as
‘user@hostname:file name’. In either case, tar will invoke the command
rsh (or remsh) to start up an /usr/libexec/rmt on the remote machine
Registration is open for Startup School 2019. Classes start July 22nd.
| Apply to YC