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.)
1 tar cvf /dev/diskette . 2 tar tvf /dev/fd0 3 tar xvf /dev/fd0 4 tar cvf mytarfile . |
Explanation
Sends all files under the present working directory (the dot directory) to a floppy on tape device /dev/diskette, and prints the files as they are being sent.
Displays the table of contents of what is on the floppy at tape device /dev/fd0.
Extracts files from the floppy on the device.
Creates a tar archive file called myfile consisting of everything from the current working directory down the tree
18.118.138.195