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 files as they are being sent.

  2. Displays the table of contents of what is on the floppy at tape device /dev/fd0.

  3. Extracts files from the floppy on the device.

  4. Creates a tar archive file called myfile consisting of everything from the current working directory down the tree

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.138.195