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.4 (Berkeley) 06/11/90 7.\" 8.Dd 9.Os BSD 4.4 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. 23If a tape name is not specified, the environment variable 24.Ev TAPE 25is used; if 26.Ev TAPE 27does not exist, 28.Nm mt 29uses the device 30.Pa /dev/rmt12 . 31Note 32that 33.Ar tapename 34must reference a raw (not block) tape device. 35By default 36.Nm mt 37performs the requested operation once. Operations 38may be performed multiple times by specifying 39.Ar count . 40.Pp 41The available commands are listed below. Only as many 42characters as are required to uniquely identify a command 43need be specified. 44.Tp Cm eof , weof 45Write 46.Ar count 47end-of-file marks at the current position on the tape. 48.Tp Cm fsf 49Forward space 50.Ar count 51files. 52.Tp Cm fsr 53Forward space 54.Ar count 55records. 56.Tp Cm bsf 57Back space 58.Ar count 59files. 60.Tp Cm bsr 61Back space 62.Ar count 63records. 64.Tp Cm rewind 65Rewind the tape 66(Count is ignored). 67.Tp Cm offline , rewoffl 68Rewind the tape and place the tape unit off-line 69(Count is ignored). 70.Tp Cm status 71Print status information about the tape unit. 72.Tp 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 78.Tw Fl 79.Tp Ev TAPE 80.Nm Mt 81checks the 82.Ev TAPE 83environment variable if the 84argument 85.Ar tapename is not given. 86.Sh FILES 87.Dw /dev/rmt* 88.Di L 89.Dp Pa /dev/rmt* 90Raw magnetic tape interface 91.Dp 92.Sh SEE ALSO 93.\".Xr mtio 4 , 94.Xr dd 1 , 95.Xr ioctl 2 , 96.Xr environ 7 97.Sh HISTORY 98.Nm Mt 99appeared in 4.3 BSD. 100.\" mt.1: mtio(4) missing 101