Find the answer to your Linux question:
Results 1 to 6 of 6
[root@links]# tar --list -f links.tar ./SmallDebian_BE/etc/rc2.d/S89cron ./SmallDebian_BE/etc/rc2.d/S89cron When trying to delete : tar --delete -f links.tar ./SmallDebian_BE/etc/rc2.d/S89cron tar: Cannot update compressed archives tar: Error is not recoverable: exiting now i ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    3

    errors while tryting to delete a file from a TAR archive

    [root@links]# tar --list -f links.tar ./SmallDebian_BE/etc/rc2.d/S89cron
    ./SmallDebian_BE/etc/rc2.d/S89cron

    When trying to delete :

    tar --delete -f links.tar ./SmallDebian_BE/etc/rc2.d/S89cron
    tar: Cannot update compressed archives
    tar: Error is not recoverable: exiting now



    i must say that the tar file contain only soft links...not real files...
    so...maybe there the dog lay his head ?

    THx Amitos

  2. #2
    Linux Newbie
    Join Date
    Feb 2009
    Location
    Third ring of Pergatory
    Posts
    199

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    3

    follow up

    Thx dijetlo I have tried what you suggested..

    tar -f links.tar --delete /SmallDebian_BE/etc/rc2.d/s89cron

    same error as in the original message...



    can youjust try it on his own linux unit and see if you can reproduce it ?


    THx again

  4. #4
    Linux Newbie
    Join Date
    Feb 2009
    Location
    Third ring of Pergatory
    Posts
    199
    Quote Originally Posted by Amitkarny View Post
    can youjust try it on his own linux unit and see if you can reproduce it ?
    I get the same result, even if I tar -h when I make the archive, which resolves the links before the tarball is formed, the problem is that it can't update an archive without decompressing it. So if you want to use native tar, your probably going have to uncompress the archive, remove the file and re-compress it. A simple script would do that cleanly.
    Other options would include using something like "cervisia".

  5. #5
    Linux Enthusiast Bemk's Avatar
    Join Date
    Sep 2008
    Location
    Oosterhout-NB, Netherlands
    Posts
    522
    If your distro includes it, you can also use the graphical tool to remove the file.

  6. #6
    Just Joined!
    Join Date
    Mar 2009
    Posts
    3

    anybody knows how to cretae a command that will tar only the symbolic links ?

    In the previous Q, i understood its not possible to delete a link from inside the tar archive. OK

    now i want to go the othre way.
    untar the tar file. ---- > remove the undesired link ---- > then tar it again.

    what i wanna do is tar only symbolic links.
    in the man tar page i could see the -h parameter.
    but i cant do it. it tars not only the links but everything under the folder.

    anybody knows how to cretae a command that will tar only the symbolic links ?

    THx

Posting Permissions

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