1.\" Copyright (c) 1981, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)mt.1 6.6 (Berkeley) 03/14/91 7.\" 8.Vx 9.Vx 10.Dd 11.Os 12.Dt MT 1 13.Os BSD 4 14.Sh NAME 15.Nm mt 16.Nd magnetic tape manipulating program 17.Sh SYNOPSIS 18.Nm mt 19.Op Fl f Ar tapename 20.Ar command 21.Op Ar count 22.Sh DESCRIPTION 23.Nm Mt 24is used to give commands to a magnetic tape drive. 25If a tape name is not specified, the environment variable 26.Ev TAPE 27is used; if 28.Ev TAPE 29does not exist, 30.Nm mt 31uses the device 32.Pa /dev/rmt12 . 33Note 34that 35.Ar tapename 36must reference a raw (not block) tape device. 37By default 38.Nm mt 39performs the requested operation once. Operations 40may be performed multiple times by specifying 41.Ar count . 42.Pp 43The available commands are listed below. Only as many 44characters as are required to uniquely identify a command 45need be specified. 46.Tp Cm eof , weof 47Write 48.Ar count 49end-of-file marks at the current position on the tape. 50.Tp Cm fsf 51Forward space 52.Ar count 53files. 54.Tp Cm fsr 55Forward space 56.Ar count 57records. 58.Tp Cm bsf 59Back space 60.Ar count 61files. 62.Tp Cm bsr 63Back space 64.Ar count 65records. 66.Tp Cm rewind 67Rewind the tape 68(Count is ignored). 69.Tp Cm offline , rewoffl 70Rewind the tape and place the tape unit off-line 71(Count is ignored). 72.Tp Cm status 73Print status information about the tape unit. 74.Tp 75.Pp 76.Nm Mt 77returns a 0 exit status when the operation(s) were successful, 781 if the command was unrecognized, and 2 if an operation failed. 79.Sh ENVIRONMENT 80If the following environment variable exists, it is utilized by 81.Nm mt . 82.Tw Fl 83.Tp Ev TAPE 84.Nm Mt 85checks the 86.Ev TAPE 87environment variable if the 88argument 89.Ar tapename 90is not given. 91.Sh FILES 92.Dw /dev/rmt* 93.Di L 94.Dp Pa /dev/rmt* 95Raw magnetic tape interface 96.Dp 97.Sh SEE ALSO 98.\".Xr mtio 4 , 99.Xr dd 1 , 100.Xr ioctl 2 , 101.Xr environ 7 102.Sh HISTORY 103.Nm Mt 104appeared in 4.3 BSD. 105.\" mt.1: mtio(4) missing 106