mt(1) [minix man page]
MT(1) General Commands Manual MT(1) NAME
mt - magnetic tape control SYNOPSIS
mt [-f device] [count] DESCRIPTION
Mt is a user interface to the magnetic tape commands described in mtio(4). It allows one to space a tape forwards or backwards, write end of file markers, etc. With the -f option a tape device can be named, otherwise the environment variable TAPE is used if set, otherwise the default device /dev/nrst4 is assumed. Standard input is used if the tape name is a dash (-). The count argument is used to tell how many blocks or files to space or how many file markers to write. It may be a C-style decimal, octal or hexadecimal constant, by default "1". Command is the action to perform, it may be one of the following, or any unambiguous prefix (like st for status): eof, weof Write count end-of-file markers. fsf Forward space count file markers. fsr Forward space count records. (The size of a record depends on the tape, and may even be variable, depending on the size of the writes.) bsf Backwards space count files. The count may be zero to backspace to the start of the current file. (A tape device need not support backwards movement, or may be very slow doing it. Rewinding and forward spacing may be better.) bsr Backwards space count records. The tape is positioned after the last block of the previous file if you hit a filemark when spacing backwards. The block count is set to -1 to indicate that the driver has no idea where it is on the previous file. eom Forward space to the end of media. rewind Rewind the tape. offline, rewoffl Rewind and take offline. This may cause some drives to eject the tape. status Shows the status of the drive, the sense key of the last SCSI error, current file number, current record number, residual count if the last command that encountered end-of-file, and the current block size. retension Removes tape tension by winding and rewinding the tape completely. erase Erases the tape completely and rewinds it. density Sets the density code to read or write the tape to count. Density codes supported depend on the drive. This command need not be used if the drive senses the proper density on read and can only write one density. blksize, blocksize Sets the block size used to read or write the tape to count. This command may be used to select a fixed block size for a variable block size tape. This will speed up I/O for small block sizes. Use a zero count to use variable sized blocks again. ENVIRONMENT
TAPE Tape drive to use if set. FILES
/dev/nrst4 Default tape device. SEE ALSO
mtio(4), st(4). AUTHOR
Kees J. Bot (kjb@cs.vu.nl) MT(1)
Check Out this Related Man Page
mt(1) General Commands Manual mt(1) Name mt - magnetic tape manipulating program Syntax mt [-f tapename] command [count] Description The command permits the operation of a magnetic tape drive. Options The -f flag option uses the specified tape device (next argument) in place of either that tape device defined by your TAPE environment variable (.login or .profile) or /dev/nrmt0h. Some operations may be performed multiple times by specifying count. By default, performs the requested operation once. The command argument defines the operation to be performed. Only as many characters as are required to uniquely identify a command need be specified. The following is a list of commands: bsf Backspace count files. bsr Backspace count records. cache Allows to use the cache buffer on a tape drive that has the cache buffer feature. clhrdsf Clear hardware/software problem. Works with tape drives which use the TMSCP tape controller interface This command is restricted to root access only. clserex Clear serious exception. Works with tape drives which use the TMSCP tape controller interface clsub Clear subsystem. Works with tape drives which use the TMSCP tape controller interface This command is restricted to root access only. eof, weof Write count end-of-file marks at the current position on the tape. eotdis Disable end-of-tape detection. When the end of tape is reached, the tape will run off the reel. Only the superuser can issue this command. The command remains in effect for the device until end-of-tape detection is enabled with the eoten command. eoten Enable end-of-tape detection. When the end-of-tape markers are reached, the tape is halted on the reel, between the two end-of-tape markers. Only the superuser can issue this command. The command remains in effect for the device until end-of-tape detection is disabled with the eotdis command. This is the default mode after a system boot. fsf Forward-space count files. fsr Forward-space count records. nocache Disables the use of the cache buffer for any tape drive that has the cache buffer feature. offline, rewoffl Rewind the tape and place the tape unit off-line. retension Retensions the tape. Retension means moving the tape one complete pass between EOT and BOT. rewind Rewind the tape. status Print status information about the tape unit. Examples This example shows how to rewind the tape mt -f /dev/rmt0l rewind This example shows how to backspace the tape nmt1h three files: mt -f /dev/nrmt1h bsf 3 This example shows how to write two end-of-file marks at the current position on tape nmt6h: mt -f /dev/nrmt6h eof 2 Return Values In shell scripts, returns a 0 exit status when the operation(s) were successful, 1 if the command was unrecognized, and 2 if an operation failed. Files /dev/rmt?h or /dev/rmt?l Raw magnetic tape interface with rewind when closed /dev/nmt?h or /dev/nmt?l Raw magnetic tape interface with no rewind when closed See Also dd(1), tar(1), ioctl(2), mtio(4), tms(4), environ(7) mt(1)