tar Command – Resolving ‘Cannot Open: Invalid Argument’ Error

filenamestarwindows-subsystem-for-linux

I download xcrysden source package from here http://www.xcrysden.org/download/xcrysden-1.5.60.tar.gz

Then I extract it using

tar zxvf xcrysden-1.5.60.tar.gz

However, I got several errors, as tar zxvf xcrysden-1.5.60.tar.gz|grep tar: shows

tar: xcrysden-1.5.60/examples/XSF_Files/c2h4\:Ag001.xsf: Cannot open: Invalid argument
    tar: xcrysden-1.5.60/otherLICENSES/TclTk\:LICENSE: Cannot open: Invalid argument
    tar: xcrysden-1.5.60/otherLICENSES/Togl\:LICENSE: Cannot open: Invalid argument
    tar: xcrysden-1.5.60/otherLICENSES/Mesa\:LICENSE: Cannot open: Invalid argument
    tar: xcrysden-1.5.60/otherLICENSES/Meschach\:LICENSE: Cannot open: Invalid argument
    tar: xcrysden-1.5.60/otherLICENSES/LGPL\:LICENSE: Cannot open: Invalid argument
    tar: xcrysden-1.5.60/otherLICENSES/GL2PS\:LICENSE: Cannot open: Invalid argument
    tar: xcrysden-1.5.60/otherLICENSES/FFTW3\:LICENCE: Cannot open: Invalid argument
    tar: xcrysden-1.5.60/otherLICENSES/BWidget\:LICENSE: Cannot open: Invalid argument
    tar: Exiting with failure status due to previous errors

What does these message mean? Why does the extracting not complete?

Best Answer

Likely the disk you are extracting to is formatted FAT*. The FAT* filesystems do not allow : to appear in directory entries (filenames). In order to extract these files, you will need to extract to a different disk or partition whose filesystem does support such filenames — common ones include:

  • btrfs
  • ext3
  • ext4
  • FFS
  • HFS Plus (but not plain HFS)
  • NTFS
  • XFS
Related Question