tar -r on a diskfile/tar arg too long
Tom Reingold
tr at samadams.princeton.edu
Fri Jun 8 09:42:50 AEST 1990
In article <1339 at ziggy.EDU> ssi at ziggy.EDU (Ssi) writes:
$
$
$ Does anyone know any draw backs/problems with using the -r option of
$ tar(1) on disk files, as in:
$
$ cat /dev/null > TARFILE
$ tar -cvf TARFILE long_list <<-- table of contents as first file
$ for i in `cat long_list`
$ do
$ tar -rvf TARFILE $i <<-- append each file to TARFILE
$ done
$ tar -cvf /dev/rmt0 TARFILE <<-- put the whole thing to tape
$ rm TARFILE
$
$
$ note:
$
$ tar -cvf /dev/rmt0 `cat long_list`
$
$ Would give tar argument too long error.
One disadvantage is that it's going to be very slow. Each file you add
will take longer than the previous one.
This is why "cpio" takes its input names from its standard input. It's
an unusual way of doing things, but very appropriate for a file
archiver.
Also, not all files can be appended to, such as exabyte tapes. It
simply won't work.
--
Tom Reingold
tr at samadams.princeton.edu
rutgers!princeton!samadams!tr
201-560-6082
More information about the Comp.unix.questions
mailing list