Results 1 to 6 of 6
For some odd reason, I create a .tar, and now I can't unpack it. Supposedly an argument says it's being "cowardly," whatever that means. How do I get my files ...
- 01-20-2008 #1
Tar is being a coward
For some odd reason, I create a .tar, and now I can't unpack it. Supposedly an argument says it's being "cowardly," whatever that means. How do I get my files back?
Cowardly refusing to create an empty archive
- 01-20-2008 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Hmmm...
Google > "Cowardly refusing to create an empty archive" > Voila.
For one, the error is that you're trying to *create* an archive. Maybe try the tar manual?
- 01-20-2008 #3
No. Something else is going on. I know there are files inside of the archive. And I did look at google.
Could alternating between "tar cf ./configs.tar ./configs/*" and "tar -cf ./configs.tar ./configs/*" do anything?
Something might have happened to the scripts. All I know is that I'm basically running things off a floppy, and putting them onto the HDD. And then I'm moving them back and forth after each edit. This is how I test stuff. The tarring and untarring was working well. But, I'm guessing I didn't something, because I saw a problem come back up. And a couple of seconds later, I couldn't unpack the tar. I felt screwed.
I had one file somehow get this mysterious overload of data, as if the file it was to remove and replace was piping into the script. I didn't program that to happen, though.
Could a bad sector have caused this? I don't really trust my floppies.
- 01-20-2008 #4Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
*Please* read the tar manual.
If you use tar with the c switch, you are telling tar to CREATE an archive, not extract it. This is what the error is telling you.
- 01-20-2008 #5
I only used that command to create the archive.
Now, when I use tar xf or tar -xf, nothing is extracted.
No errors occur, but no files are extracted.
There are files inside of it, though. I can see the file size.
I don't think it's cut and dry. I have another archived file than can extract just fine.
- 01-20-2008 #6Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
If the same script is creating these files, then you've answered your own question and the file is corrupt.
If different methods/switches are being used with tar c, then find another one created using the same tar c as this "bad" one and try and extract it. If it works, then this one is again corrupt. If it fails, then that tar c method is bad.
If the data is that important, search on something like "recover corrupt tar" and you'll find some things like this.


Reply With Quote
