May 2017
Beginner
552 pages
28h 47m
English
The -delete option removes files from an archive:
$ tar -f archive.tar --delete file1 file2 ..
Alternatively,
$ tar --delete --file archive.tar [FILE LIST]
The next example demonstrates deleting a file:
$ tar -tf archive.tar
filea
fileb
filec
$ tar --delete --file archive.tar filea
$ tar -tf archive.tar
fileb
filec