up vote 1 down vote favorite
share [g+] share [fb]

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.

link|improve this question
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 '10 at 18:14
Exact message... I'm on MacOX... bsdtar 2.6.2 - libarchive 2.6.2 – Simon Feb 21 '10 at 18:16
feedback

migrated from stackoverflow.com Feb 21 '10 at 20:18

This question came from our site for professional and enthusiast programmers.

1 Answer

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|improve this answer
I was using BSD tar... and I needed to use GNU tar.... On Mac OSX use "gnutar -xvzf"... Many thanks... – Simon Feb 21 '10 at 18:25
Then you might as well accept the answer :-) – Nathan Fellman Feb 21 '10 at 22:17
feedback

Your Answer

 
or
required, but never shown

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