MT(1) UNIX Programmer's Manual MT(1) NAME mt - magnetic tape manipulating program SYNOPSIS mt [ -t _t_a_p_e_n_a_m_e ] _c_o_m_m_a_n_d [ _c_o_u_n_t ] mt [ -f _t_a_p_e_n_a_m_e ] _c_o_m_m_a_n_d [ _c_o_u_n_t ] DESCRIPTION _M_t is used to give commands to nine-track tape. If a tape name is not specified, the environment variable TAPE is used; if no such environment variable exists, _m_t uses the device /_d_e_v/_n_r_m_t_1. Note that _t_a_p_e_n_a_m_e must reference a raw (not block) tape device. If the optional _c_o_u_n_t is not specified, _m_t uses a count of 1. A command can be abbreviated to as few letters as are neces- sary to uniquely identify it. Here are the commands and the types of tape drives they can apply to: Command Description eof, weof write _c_o_u_n_t end-of-file marks fsf space forward _c_o_u_n_t files fsr space forward _c_o_u_n_t records bsf space backward _c_o_u_n_t files bsr space backward _c_o_u_n_t records rewind rewind tape offline, rewoffl rewind tape and go offline status return status of the tape unit FILES /dev/rmt* Raw magnetic tape interface SEE ALSO dd(1), ioctl(2), mt(4), environ(5) MESSAGES usage: mt [ -f device ] command [ count ] This is a memory jogger message to tell you how to use the _m_t command in the event that you typed something wrong. mt: don't grok _c_o_m_m_a_n_d This message indicates that the magnetic tape _c_o_m_- _m_a_n_d that you typed as an argument to _m_t was not in the set of requests it recognizes. See the list of correct commands above. mt: negative repeat count The repeat count for commands such as fsf must be positive. _c_o_m_m_a_n_d _n_n_n _d_e_v_i_c_e failed: _s_o_m_e _e_r_r_o_r _m_e_s_s_a_g_e Printed 7/25/83 1 MT(1) UNIX Programmer's Manual MT(1) The magnetic tape _c_o_m_m_a_n_d applied to _d_e_v_i_c_e with a repeat count of _n_n_n did not work for some reason. The reason appears as the string _s_o_m_e _e_r_r_o_r _m_e_s_s_a_g_e. Check that the device name was correct, or that the command is applicable to that device. For example, the message might appear as: fsf 1 f/dev/rmt0 failed: File not found mt: _s_o_m_e _e_r_r_o_r _m_e_s_s_a_g_e This message usually means that you are applying the _m_t command to the wrong kind of device, that is, a device that the _m_t command does not recog- nize. The _s_o_m_e _e_r_r_o_r _m_e_s_s_a_g_e is often cryptic, for example: % mt -f /dev/console fsf 5 /dev/console: Inappropriate ioctl for device mt: can't open _t_a_p_e_n_a_m_e: _s_o_m_e _e_r_r_o_r _m_e_s_s_a_g_e The _m_t command cannot access the device specified by _t_a_p_e_n_a_m_e. mt: can't get status from _t_a_p_e_n_a_m_e: _s_o_m_e _e_r_r_o_r The device specified by _t_a_p_e_n_a_m_e doesn't support the system call necessary to obtain the status of the tape drive. EXIT CODES 0 Successful completion 1 _M_t did not recognize the command; the device could not be opened. 2 The _i_o_c_t_l(2) system call to the tape driver failed. BUGS Commands are not interruptible. Printed 7/25/83 2