up vote 1 down vote favorite

Hi,

I've just received some files file(s).tgz... I've tried tar -xvzf file.tgz... However I'm getting error "Attempt to write to an empty file"... Am I missing something... The folder directory system has been made but all the directories are empty...

Thanks.

flag
I cannot find the string "Attempt to write to an empty file" in the source code for tar or gzip. Is that the exact error message, or are you rephrasing? – Jacob Feb 21 at 18:14
Exact message... I'm on MacOX... bsdtar 2.6.2 - libarchive 2.6.2 – Simon Feb 21 at 18:16

migrated from stackoverflow.com

1 Answer

up vote 3 down vote

A similar issue is encountered at http://code.google.com/p/libarchive/issues/detail?id=3

It looks like a bug in BSD tar, which is the default tar on FreeBSD, Mac OS X, and possibly other systems.

Easiest workaround is probably to extract with GNU tar. Just run "gnutar" instead of "tar" if you're on OS X. On FreeBSD you may need to install gnutar from ports.

link|flag
I was using BSD tar... and I needed to use GNU tar.... On Mac OSX use "gnutar -xvzf"... Many thanks... – Simon Feb 21 at 18:25
Then you might as well accept the answer :-) – Nathan Fellman Feb 21 at 22:17

Your Answer

get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.