I get an error when I uncompress my tar
.
I do this:
tar xvf VM_DECOMPTES.tar
and after some time I get the following error:
tar: short read
What is going wrong here?
tar: unrecognized option `–version' BusyBox
v1.9.1-VMware-visor-klnext-2965 (2010-04-19 12:53:48 PDT) multi-call
binary
Best Answer
I suspect that your tarfile is corrupted or truncated.
The header of a tarfile contains a
size
field that contains the length of the file.¹ If the actual file is shorter than the header says it should be, tar will try to read past the filesystem end of file and get back a read shorter than it expected, thus generating the message you see.¹ This feature dates to when tar was used primarily for Tape ARchiving where you could only know the length of a "file" by reading until you hit an EOF marker on the tape. It was retained for backwards compatibility and also provides a nice (if kinda cheap) check on header and file consistency.