Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to extract a tarball using tar -xvf that's in the format (where * is any word character) *@*@*@*.tar.gz but I think tar is trying to find the file at a remote location. The error I get is for the command tar -xzvf tasf423@2012-02-22\@00:03:04\@ja41nf.tar.gz:

tar (child): Cannot connect to 2012-02-22@00: resolve failed

I tried using back slashes to escape it and even tried replacing the @ symbols with %40 but none of this seemed to work. Is there any way to extract a tarball using the tar command with an @ in its name?

share|improve this question

migrated from stackoverflow.com Feb 27 '12 at 0:04

This question came from our site for professional and enthusiast programmers.

Did you try double quotes around the file name? tar -xvf "@*@.tar.gz" – Diego Feb 25 '12 at 3:09
Yeah, still didn't work. I'm running the command with a perl script using a system command so I don't think that's the problem, but when I try quotes in command line it still fails. tar: Cannot connect to 2012-02-22@00: resolve failed – Redian Feb 25 '12 at 3:12
up vote 9 down vote accepted

The problem is the colons, not the at signs. Use --force-local.

share|improve this answer
I think that's it too. Linux is trying to connect to a remote server because of it. +1 – Yanick Girouard Feb 25 '12 at 3:22
Yup! That was it! I was thinking of the ssh user@host:path syntax and figured it saw the @ first. force-local worked though. Thank you! – Redian Feb 25 '12 at 3:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.