May 2017
Beginner
552 pages
28h 47m
English
The -r option will append new files to the end of an existing archive:
$ tar -rvf original.tar new_file
The next example creates an archive with one text file in it:
$ echo hello >hello.txt
$ tar -cf archive.tar hello.txt
The -t option displays the files in an archive. The -f option defines the archive name:
$ tar -tf archive.tar
hello.txt
The -r option appends a file:
$ tar -rf archive.tar world.txt
$ tar -tf archive.tar
hello.txt
world.txt
The archive now contains both the files.