tar: how to update
1
1 4.2.3.1 How to Update an Archive Using '--update'
1 .................................................
1
1 You must use file name arguments with the '--update' ('-u') operation.
1 If you don't specify any files, 'tar' won't act on any files and won't
1 tell you that it didn't do anything (which may end up confusing you).
1
1 To see the '--update' option at work, create a new file, 'classical',
1 in your practice directory, and some extra text to the file 'blues',
1 using any text editor. Then invoke 'tar' with the 'update' operation
1 and the '--verbose' ('-v') option specified, using the names of all the
1 files in the 'practice' directory as file name arguments:
1
1 $ tar --update -v -f collection.tar blues folk rock classical
1 blues
1 classical
1 $
1
1 Because we have specified verbose mode, 'tar' prints out the names of
1 the files it is working on, which in this case are the names of the
1 files that needed to be updated. If you run 'tar --list' and look at
1 the archive, you will see 'blues' and 'classical' at its end. There
1 will be a total of two versions of the member 'blues'; the one at the
1 end will be newer and larger, since you added text before updating it.
1
1 The reason 'tar' does not overwrite the older file when updating it
1 is that writing to the middle of a section of tape is a difficult
1 process. Tapes are not designed to go backward. ⇒Media, for
1 more information about tapes.
1
1 '--update' ('-u') is not suitable for performing backups for two
1 reasons: it does not change directory content entries, and it lengthens
1 the archive every time it is used. The GNU 'tar' options intended
1 specifically for backups are more efficient. If you need to run
1 backups, please consult ⇒Backups.
1