Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User Agent-X's Avatar
    Join Date
    May 2005
    Location
    Dimension X
    Posts
    261

    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

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,752
    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?

  3. #3
    Linux User Agent-X's Avatar
    Join Date
    May 2005
    Location
    Dimension X
    Posts
    261
    Quote Originally Posted by HROAdmin26 View Post
    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?
    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.

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,752
    *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.

  5. #5
    Linux User Agent-X's Avatar
    Join Date
    May 2005
    Location
    Dimension X
    Posts
    261
    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.

  6. #6
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,752
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •