Xref: utzoo comp.unix.wizards:22368 comp.unix.questions:22773 Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!rutgers!njin!princeton!cs!samadams!tr From: tr@samadams.princeton.edu (Tom Reingold) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: tar -r on a diskfile/tar arg too long Keywords: tar -r on disk file Message-ID: <225@rossignol.Princeton.EDU> Date: 7 Jun 90 23:42:50 GMT References: <1339@ziggy.EDU> Sender: news@cs.Princeton.EDU Followup-To: comp.unix.wizards Organization: Princeton University, NJ Lines: 36 In article <1339@ziggy.EDU> ssi@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@samadams.princeton.edu rutgers!princeton!samadams!tr 201-560-6082