Note that the tape drives are in the CPU boxes for the workstations, and all these boxes except SGI3 are in the big machine room next door to the GVU Lab. Only SGI3 has a tape drive accessible in the GVU Lab. If you need to get into the machine room, check with one of the GVU Lab GRA assistants: the list of GRA's is posted on Randy Carpenter's door (Room 210 CoC.
WARNING: First and foremost, don't trust a 1/4" tape-- it is not as reliable as a hard disk unit and errors that make a tape unreadable can occur. If you want to be sure of a tape copy, make TWO tapes, verify them, and treat them gently. Take care of your tapes. See user assitants if you need to borrow a used one, or buy your own (see Student Center Computer Store) for safekeeping & most reliable storage.
Name Device Device Name
--------- --------------------------- ---------------
buckhead 4mm/DAT tape drive (2.5 GB) /dev/tape
sgi6 4mm/DAT tape drive /dev/tape
stonemtn 4mm/DAT tape drive /dev/tape
dec1 4mm/DAT tape drive /dev/rmt0a
dec2 4mm/DAT tape drive /dev/rmt0a
screamer 4mm/DAT tape drive
These drives hold up to 2 GB of data.
$ man tar # tar command information
$ man tps # tape drive information
The sections below describe how to write files to tape, check the contents of a tape, and read files from tape.
$ tar cv foo
The 'c' option creates a new archive. CAUTION!! This will destroy any existing data on the tape. The 'v' option places tar in the verbose mode, causing details of the process to be printed on standard out.
By default, tar writes to /dev/tape, or the contents of the TAPE environment variable, if it is set. To specify a filename for the archive, use the 'f' option, which must be followed by the archive filename. The filename can be a file on disk or a tape device:
$ tar cvf foo
$ tar cvf archive.tar foo
$ tar cvf /dev/rmt0a foo
To write an entire file hierarchy to tape, use the following command:
$ tar cv .
Remember, this will erase the contents of the tape. This command will cause the contents of the current directory and all subdirectories below it to be written to the archive.
Alternatively, you can use the 'r' option to append files to the end of an existing tape:
$ tar rv foo
$ tar rvf /dev/rmt3a foo
Note that the 'r' option does not work on 1/4" tape drives.
$ tar t
$ tar tvf archive.tar
$ tar tvf /dev/rmt0a
$ tar xvRo foo
$ tar xvRof /dev/rmt0 foo
The 'R' flag indicates that relative path names should be used. This option is important if you are extracting files that may have been archived from a different file hierarchy than the one you are placing the file into. For example, if you are in pwd=/home/jerky, and wish to extract the file /home/peewee/foo, type:
$ tar xvRo home/peewee/foo
The 'o' option is required with some versions of tar to make tar ignore the ownership flags stored in the archive and create the files with the user as owner.
To read an entire archive into the current directory, use a command like:
$ tar xvRo
$ tar xvRof /dev/rmt5
This will create a complete hierarchy of files and subdirectories filled with files, using your current directory as the root. You are given ownership of all the new files and directories created, regardless of the ownership data read read from the tape.
Tape drive command (choose one and only one):
c Create a new archive on tape, wiping out existing contents
r append a new archive on tape, preserving existing contents
x extract contents of the archive on tape
t read table of contents of archive on tape
Modifiers (use as many as you want):
v verbose mode; tells you what is going on.
R place files or file hierarchies (subdirectories, etc) relative
to the current directory. Without this extension, tar
reads files/directories from tape and puts them right
where they came from-- their locations when the tape was
recorded.
o (lower case o) give ownership of the files to the user executing
tar (you!). You MUST use this o option if you want to read
tapes made by others--if you don't, tar will read the
tape and will try to create files in your directory
that are owned by the creator of the tape; the shell will
object strenuously with 'could not create filename' error
messages, and no files will be copied.
f this option must be followed by a tar filename. Tar will use this
filename as its input when writing to tape, and as its output
when reading from tape. If the filename is a minus sign, then
it will use stdin/stdout. By using pipes and stdin/stdout, you
can copy entire file hierarchies, and with the remote shell
'rsh' you can even copy them between machines!
Remember to see the man page on the machine which you are working for details on the version of tar that exists there.
Once you have located the icon for the tape drive to be used, double-clicking the icon will open a window for the tape device. Option menus allow you to choose the archive type (tar or cpio), and the operation (list, read, or write). Clicking the help button brings up the help viewer which details how to list, read, and write files.