Subject: Re: FYI: upgrading GNU tar
To: Christos Zoulas <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 10/11/2002 13:58:21
[ On Friday, October 11, 2002 at 15:22:01 (GMT), Christos Zoulas wrote: ]
> Subject: Re: FYI: upgrading GNU tar
> In article <20021010051853.546C6B@proven.weird.com>,
> Greg A. Woods <email@example.com> wrote:
> Ok - as promised - I put my version of pax that should handle -C properly,
> by merging all the OpenBSD fixes that I thought were good for us. I put
> it on ftp.astron.com:~ftp/pri/pax.tar.gz. If you test it, then I can
> commit it and the lame excuses will be over :-)
Just from a quick glance through options.c I think you need to change,
'-I' to, or add in addition:
-T file Read the names of files to archive or extract from the giv-
en file, one per line. A line may also specify the posi-
tional argument ``-C directory''.
This is compatible with with GNU Tar (which does not have '-I'):
--files-from file Get names of files to extract or create from
file, one per line.
So far as I could find out no other Unix vendor's 'tar' had this feature
until Xenix came along, not even the real 4.4BSD (which does have
positional -C). AT&T picked up this feature for SysVr3.2/i386 (which
needed Xenix compatability):
F Causes tar to use the next argument as the name of a
file from which succeeding arguments are taken. The
dash (-) is not a valid argument here.
By the time SysVr4.2/i386 came out this became (and remains all the way
to UnixWare 7 and Open UNIX 8):
F This modifier uses the incfile argument as a file
containing a list of named files (or directories)
to be included in the archive. This modifier may
only be used with the -c, -r, and -u options.
This modifier may not be used with the X modifier.
(i.e. dropping the "succeeding arguments" and now only allowing named
files and directories)
In my research into these issues the last time around I found that no
modern implementation supports the Xenix 'F' keyletter with the original
As for '-I', well I could only find it supported in SunOS-5, where it's
a true "option", as opposed to being an operand or function (key) letter:
Open include-file containing a list of files, one per
line, and treat as if each file appeared separately on
the command line. Be careful of trailing white spaces.
In the case where excluded files (see X function modif-
ier) are also specified, they take precedence over all
included files. If a file is specified in both the
exclude-file and the include-file (or on the command
line), it will be excluded.
(and for other historical reasons SunOS-5 uses 'F' for other purposes)
So, while '-I' is useful for Solaris compatability, '-T' is the really
important choice for GNU Tar compatability (and even thinking about
using '-F'/'F' for anything is only going to get you into trouble :-).
There are of course no real standards defining 'tar' since of course the
real standards only define 'pax'. :-)
(which isn't quite true -- SuSv2 defined it as a legacy interface, but
as such it only defined the original V7 interface with locale support)
Greg A. Woods
+1 416 218-0098; <firstname.lastname@example.org>; <email@example.com>
Planix, Inc. <firstname.lastname@example.org>; VE3TCP; Secrets of the Weird <email@example.com>