3

I have a tar(.gz) file created on a Linux system, and the filenames contain colon characters. The tar utilities I can find on Windows don't extract these files at all. How can I do this, ideally from the command-line?

If there's some way to do a filename-translation at the compression end, that would be ok too.

To make it clearer what I mean:

# on linux system
touch example:file
tar cvf test.tar example:file

# copy test.tar to windows system
tar xvf test.tar
... can't create 'example:file': Invalid argument
1
  • Can you provide some examples and more details of what you tried and any specific errors you received?
    – Eric G
    Commented Mar 25, 2014 at 2:36

2 Answers 2

2

7-zip extracts tars containing files with names containing colons. It replaces colons with underscores.

7-zip can be used also from command line, e.g.:

"c:\Program Files\7-Zip\7z.exe" x tar_containing_files_with_colons_in_names.tar
0
0

Colons are used to denote an alternate file stream in Windows. This may be causing the problem.

If you are able to echo the file you may be able to pipe it into your tar extractor. Also, since you will be extracting it, you may be able to rename it. If you are having trouble referencing the file with the full name, you may be able to use wildcard matching for the portion before the colon. e.g., if its something:else.tgz you maybe be able to reference it as something*, if there are not a lot of the same file.

One last things may be to see what the file's dos-short name is and reference using that instead of the full long name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .