UNIX Shells by Example (4th Edition)

 <  Day Day Up  >  

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

tar [ ] crtux [ bBefFhilmopvwX0134778 ] [ tarfile ] [ blocksize ] [ excludefile ] [ I includefile ] filename1 filename2 . . . C directory filenameN ...

Example A.57.

1 tar cvf /dev/diskette 2 tar tvf /dev/fd0 3 tar xvf /dev/fd0

EXPLANATION

  1. Sends all files under the present working directory to tape at device /dev/diskette , and prints the files that are being sent.

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

  3. Extracts all files from tape and prints which files were extracted.

 <  Day Day Up  >  

Категории