mt(1) Name mt - magnetic tape manipulating program Syntax mt [-f _t_a_p_e_n_a_m_e] _c_o_m_m_a_n_d [_c_o_u_n_t] Description The _m_t 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 vari- able (.login or .profile) or /dev/nrmt0h. Some operations may be performed multiple times by specifying _c_o_u_n_t. By default, _m_t performs the requested operation once. The _c_o_m_m_a_n_d 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 _c_o_u_n_t files. bsr Backspace _c_o_u_n_t records. cache Allows _m_t 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 _t_m_s(4). This command is restricted to root access only. clserex Clear serious exception. Works with tape drives which use the TMSCP tape controller interface _t_m_s(4). clsub Clear subsystem. Works with tape drives which use the TMSCP tape controller interface _t_m_s(4). This command is restricted to root access only. eof, weof Write _c_o_u_n_t end-of-file marks at the current posi- tion 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 1 mt(1) 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 _c_o_u_n_t files. fsr Forward-space _c_o_u_n_t 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 _r_m_t_0_l: 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, _m_t 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 2 mt(1) See Also dd(1), tar(1), ioctl(2), mtio(4), tms(4), environ(7) 3