Subject: Re: pax-as-tar extract to stdout patch
To: NetBSD Userlevel Technical Discussion List <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 06/17/2003 23:17:16
> Both 'tar' and 'cpio' as command-line interfaces were as good as dead
> essentially _before_ POSIX got off the ground -- they've been long
> dead ever since!

I for one sure find tar awfully useful for a dead interface.  (Perhaps
it helps to have an implementation I can trust.)

> [...extract to stdout...]
> However this ability is restricted to a very tiny number of 'tar'
> implementations (two as far as I know, at least until this feature
> was proposed for NetBSD's new implementation),

Is mine one of them?  If not, make that three. :-)

As for your "all extract-to-stdout is good for", well, I use it for
other things sometimes.  It can be a convenience when I want to look at
a README or some sort, I extract to stdout and pipe to less rather than
going through the rigamarole of finding/choosing writable temp space,
extracting, looking at, and then remembering to clean up.  It can be
useful, yes, to extract to a different name.  It can be useful when
extracting in the ordinary way to prevent tar from doing _any_ meddling
with the file's mode bits.

For most of these, yes, it's just a convenience.  Is convenience not
worth implementing?

> Every other case of wanting to extract one file from an archive
> requires you to know exactly what pathname the archived file has and
> thus makes it trivial, especially in a script, for the programmer to
> simply extract the file onto the filesystem (perhaps in a temporary
> sub-directory if necessary), and then reference it directly.

It is theoretically trivial, yes.  I have found that it is often more
convenient, though, to extract it to stdout.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B