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