GNU Info

Info Node: (tar.info)appending files

(tar.info)appending files


Next: multiple Up: append
Enter node , (file) or (file)node

Appending Files to an Archive
.............................

     _(This message will disappear, once this node revised.)_

   The simplest way to add a file to an already existing archive is the
`--append' (`-r') operation, which writes specified files into the
archive whether or not they are already among the archived files.  When
you use `--append', you _must_ specify file name arguments, as there is
no default.  If you specify a file that already exists in the archive,
another copy of the file will be added to the end of the archive.  As
with other operations, the member names of the newly added files will
be exactly the same as their names given on the command line.  The
`--verbose' (`-v') option will print out the names of the files as they
are written into the archive.

   `--append' cannot be performed on some tape drives, unfortunately,
due to deficiencies in the formats those tape drives use.  The archive
must be a valid `tar' archive, or else the results of using this
operation will be unpredictable.  Note: Media.

   To demonstrate using `--append' to add a file to an archive, create
a file called `rock' in the `practice' directory.  Make sure you are in
the `practice' directory.  Then, run the following `tar' command to add
`rock' to `collection.tar':

     $ tar --append --file=collection.tar rock

If you now use the `--list' (`-t') operation, you will see that `rock'
has been added to the archive:

     $ tar --list --file=collection.tar
     -rw-rw-rw- me user     28 1996-10-18 16:31 jazz
     -rw-rw-rw- me user     21 1996-09-23 16:44 blues
     -rw-rw-rw- me user     20 1996-09-23 16:44 folk
     -rw-rw-rw- me user     20 1996-09-23 16:44 rock


automatically generated by info2www version 1.2.2.9