MT(1) COMMAND REFERENCE MT(1) NAME mt - magnetic tape manipulating program for workstations SYNOPSIS mt [ -f tapename ] command [ count ] mt [ -f tapename ] select [ -b block_size | -m mode | -d density | -s speed code | -v ] DESCRIPTION mt is used to give commands to a magnetic tape drive. If a tape name is not specified, the environment variable TAPE is used; if TAPE does not exist, mt uses the device /dev/ntc. Note that tapename must refer to a raw (not block) tape device and should usually refer to a no-rewind device. By default mt performs the requested operation once. Operations may be performed multiple times by specifying count. The available commands are listed below. Only as many characters as are required to uniquely identify a command need be specified. eof, weof Write count end-of-file marks at the current position on the tape. fsf Forward space count files. bsf Back space count files. fsr Forward space count records. bsr Back space count records. rewind Rewind the tape (Count is ignored.) offline, rewoffl Rewind the tape and place the tape unit off-line (Count is ignored.) status Print status information about the tape unit. (Count is ignored.) select Used for setting parameters to non-default values for SCSI devices only. (Count is ignored.) -b block_size A number of bytes is expected when size is specified. A number can end in b or u, specifying multiplication by 512 or 1024. Printed 5/12/88 1
MT(1) COMMAND REFERENCE MT(1) -m mode mode is either b, buffered, or, u, unbuffered. In buffered mode the tape does not wait for output to be completed. -d density density is either a SCSI tape density code (see the manual for the SCSI device) or a density in bits per inch. If supplied with an actual density, mt will look up and determine the corresponding SCSI tape density code, or report an error if it does not understand the density. -s speed code mt does not translate the speed code; see the manual for the SCSI device. -v Turns on verbose mode. mt will report the device status before and after parameters are changed. fss Forward space until count sequential file marks are found. bss Back space until count sequential file marks are found. erase Erase from the current position to the end of the tape. Some drivers will only allow this command at BOT. (Count is ignored.) end Forward space to the end of recorded data. (Count is ignored.) tension, retension Retension cartridge tapes, leaving the tape at BOT. (Count is ignored.) EXAMPLES To rewind a tape to the beginning, enter mt -f /dev/tc rewind To set a 9-track tape drive device, /dev/mt6250, to 6250 bpi, enter mt -f /dev/mt6250 select -d 6250 -v FILES /dev/ntc* Cartridge tape interface Printed 5/12/88 2
MT(1) COMMAND REFERENCE MT(1) DIAGNOSTICS command command not valid Command wasn't one of the commands listed above or wasn't a unique abbreviation. count must be positive Count cannot be a negative number. can't open tapename Mt couldn't open the named tape. The device doesn't exist, the tape wasn't mounted, or the tape was write protected against a weof or erase command. Other messages describe tape errors. RETURN VALUE [NO_ERRS] Command completed without error. [USAGE] Incorrect command line syntax. Execution terminated. [P_ERR] A system error occurred. Execution terminated. See intro(2) for more information on system errors. CAVEATS In some cases, the user must be super-user to change SCSI parameters using select. If a system has multiple users, the tape unit may need to be in an offline state. There are two methods to get the tape unit back online. They are: Recycle the tape. Then manually remove the tape from the drive and remount or reinsert it. Or, type: mt -f /dev/retension SEE ALSO dd(1), ioctl(2), tc(4), and environ(7). Printed 5/12/88 3
%%index%% na:192,108; sy:300,584; de:884,2414;3562,2087; ex:5649,326; fi:5975,110; di:6349,730; rv:7079,444; ca:7523,877; se:8400,172; %%index%%000000000158