tar—stores and retrieves files from an archive file, normally a tape device

tar [ - ] c|r|t|u|x [ bBefFhilmopvwX0134778 ] [ tarfile ]
   [ blocksize ] [ exclude-file ] [ -I include-file ]
   filename1 filename2 … -C directory filenameN …

tar is an archiving program designed to store and extract files from an archive file, called a tarfile. The tarfile can be either a regular UNIX/Linux file or a tape device. Often used for saving files on a floppy disk. (See Linux man page for a complete list of options.)

Example A.59.
1  tar cvf /dev/diskette .
2  tar tvf /dev/fd0
3  tar xvf /dev/fd0
4  tar cvf mytarfile .
				

Explanation

  1. Sends all files under the present working directory (the dot directory) to a floppy on tape device /dev/diskette, and prints the ...

Get Linux Shells by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.