www.delorie.com/gnu/docs/tar/tar_52.html   search  
 
Buy GNU books!


GNU tar

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.4 Updating an Archive

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

In the previous section, you learned how to use --append (-r) to add a file to an existing archive. A related operation is --update (-u). The `--update' operation updates a tar archive by comparing the date of the specified archive members against the date of the file with the same name. If the file has been modified more recently than the archive member, then the newer version of the file is added to the archive (as with --append (-r)).

Unfortunately, you cannot use `--update' with magnetic tape drives. The operation will fail.

@quote-arg {other examples of media on which --update will fail? need to ask charles and/or mib/thomas/dave shevett..}

Both `--update' and `--append' work by adding to the end of the archive. When you extract a file from the archive, only the version stored last will wind up in the file system, unless you use the --backup option (@quote-arg -ref{Multiple Members with the Same Name}).

4.2.4.1 How to Update an Archive Using --update  


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003