I know about --force-local; as I said, I only get that error message
when I *forget* to compensate for colons. My point is that the error
message is not appropriate to the error condition, and not descriptive
enough to make obvious to the user what the problem is.
"I/O error" is exactly the same message as tar would use for a hardware
failure. It's saying to the user that tar can see the file, but cannot
read it. This is incorrect; tar is in an error state because it *cannot
find* the file. You could argue that in this case that is an I/O error
condition because tar is unable to contact the device/host that
supposedly has the file. By analogy then, tar should also give the "I/O
error" message when you specify a nonexistent device, but it does not:
$ tar -xf /dev/loop1
tar: This does not look like a tar archive
$ tar -xf /dev/nonexistent_device
tar: /dev/nonexistent_device: Cannot open: No such file or directory
I would be happy if tar issued either of those error messages for a
filename incorrectly given with colons, and for consistency's sake I
feel that it should. Let "I/O error" be reserved only for cases where
there is an actual I/O problem after the file has been successfully found.
~Felix.
On 15/03/09 01:51, Kamil Dudka wrote:
Look at http://www.gnu.org/software/tar/manual/html_node/file.html and
the --force-local option.
Kamil
On Saturday 14 of March 2009 08:43:54 Marcel (Felix) Giannelia wrote:
Hi,
I understand why tar is complaining -- I know that when it sees colons
in a filename it's expecting it to be in host:/file/name format -- but
the error message it gives when I forget to properly escape colons in
local filenames is frightening:
$ tar -tf 2009-03-09T01\:30\:03-07\:00.rdiff-backup-increment.tar
tar: 2009-03-09T01\:30\:03-07\:00.rdiff-backup-increment.tar: Cannot
open: Input/output error
tar: Error is not recoverable: exiting now
Of course, after a few seconds I realize my error and am relieved to
know that that didn't come from my hard drive or filesystem, but I think
that the error message should read "Cannot open: host 2009-03-09T01 not
found" -- that way, no one need go through any momentary terror when
this happens :)
Perhaps the error could even read "Cannot open: host 2009-03-09T01 not
found (prefix with './' for a local filename with colons)"?
~Felix.