From a0f1fa71bd7777b7fad08add51b40ed9877a71e3 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 11 Aug 2021 21:46:06 +0200 Subject: Updated tar guide with link to ar and f- option --- how_to_archive_with_posix_tar_cpio_and_pax.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'how_to_archive_with_posix_tar_cpio_and_pax.html') diff --git a/how_to_archive_with_posix_tar_cpio_and_pax.html b/how_to_archive_with_posix_tar_cpio_and_pax.html index 998afb7..cd53a4b 100644 --- a/how_to_archive_with_posix_tar_cpio_and_pax.html +++ b/how_to_archive_with_posix_tar_cpio_and_pax.html @@ -13,7 +13,7 @@

How To Archive With POSIX tar, cpio and pax

-

Published on 2020-07-22 22:30:00+02:00 +

Published on 2020-07-22 22:30:00+02:00, last modified on 2021-08-11 21:35:00+02:00

The usual answer to archive anything is tar. As you may see I intentionally linked to the GNU Tar. If you are a *BSD user then you use some other implementation. Both of them follow and extend POSIX'es standard for tar utility. Or so you would think. @@ -70,6 +70,9 @@ $ tar xf ../archive.tar $ tar xf ../archive.tar a_file

This one will extract only a_file from the archive. +

It's worth noting that you can pass - as argument to file option. This way the archive will be read from +standard input or written to standard output depending on the operation. Good chunk of implementations assumes this as a +default behaviour if no archive file is provided at all.

That's pretty much it about tar. The are two more functions: r that adds new file to existing archive, and u that first tries to update the file in archive if it exists and if it doesn't then it adds it. Note, that the usual compression options are not available in POSIX, they are an extension. @@ -231,8 +234,8 @@ all of those utilities have various implementations that are compliant to POSIX don't get tricked by them. I find pax the most reliable of them as its "novelty" and the interface that was quite "modern" from the start resulted in decently compliant implementations. Moreover, it includes nice things one may know from both cpio and tar. Find a moment to check it out! -

Let's pretend that ar doesn't exist. -Thank you.

+

Now, it's time for ar. And it so +happens that a year or so later I wrote about it. Enjoy.

boo!
-- cgit v1.1