tar command to extract archive with colon in the name

I try tar -zxvf plugin\:xyz.tgz and received the error:

rsh: Could not resolve hostname plugin: Name or service not known
tar: plugin\:thold-latest.tgz: Cannot open: Input/output error
tar: Error is not recoverable: exiting now

Can someone help me?


You could do the following:

mv plugin\:xyz.tgz plugin-xyz.tgz
tar xvfp plugin-xyz.tgz

The name of the archive itself is not really that critical, and the files will extract to the same locations regardless of the archive name.


Try --force-local option:

tar -zxvf plugin:xyz.tgz --force-local

From info pages

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.