Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    I'm pretty sure this cat tar_archive | tar f - --delete filename_to_delete >another_archive can be simplified to <tar_archive tar f - --delete filename_to_delete >another_archive and probably even to tar f tar_archive --delete filename_to_delete >another_archive. Commented Feb 11, 2022 at 15:57
  • I understand the first simplified version, and for the 2nd, you mean the deletion initially not working/taking toooo long, because I didn't redirect it to another archive right? Let me test again
    – WesternGun
    Commented Feb 11, 2022 at 16:00
  • With your 2nd form, I have error: tar: opt/amq/activemq-all-5.11.0.redhat-630495.jar: Not found in archive, and the resulting tar is much smaller than the original one. It stops at lib/ and did not process dirs afterwards, as tar errors out. The first form works the same. Thanks for helping. I see this tar is so widely used but still with much myth around it.
    – WesternGun
    Commented Feb 11, 2022 at 16:04
  • Oh well, I wrote "probably", not "certainly". Anyway, it's nice you have solved your problem. Upvoted. Commented Feb 11, 2022 at 16:06