tar: appending files

1 
1 4.2.2.1 Appending Files to an Archive
1 .....................................
1 
1 The simplest way to add a file to an already existing archive is the
1 '--append' ('-r') operation, which writes specified files into the
1 archive whether or not they are already among the archived files.
1 
1    When you use '--append', you _must_ specify file name arguments, as
1 there is no default.  If you specify a file that already exists in the
1 archive, another copy of the file will be added to the end of the
1 archive.  As with other operations, the member names of the newly added
1 files will be exactly the same as their names given on the command line.
1 The '--verbose' ('-v') option will print out the names of the files as
1 they are written into the archive.
1 
1    '--append' cannot be performed on some tape drives, unfortunately,
1 due to deficiencies in the formats those tape drives use.  The archive
1 must be a valid 'tar' archive, or else the results of using this
1 operation will be unpredictable.  ⇒Media.
1 
1    To demonstrate using '--append' to add a file to an archive, create a
1 file called 'rock' in the 'practice' directory.  Make sure you are in
1 the 'practice' directory.  Then, run the following 'tar' command to add
1 'rock' to 'collection.tar':
1 
1      $ tar --append --file=collection.tar rock
1 
1 If you now use the '--list' ('-t') operation, you will see that 'rock'
1 has been added to the archive:
1 
1      $ tar --list --file=collection.tar
1      -rw-r--r-- me/user          28 1996-10-18 16:31 jazz
1      -rw-r--r-- me/user          21 1996-09-23 16:44 blues
1      -rw-r--r-- me/user          20 1996-09-23 16:44 folk
1      -rw-r--r-- me/user          20 1996-09-23 16:44 rock
1