Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

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

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

    
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

1 Answer 1

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.

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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