1.\" Copyright (c) 1981, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. All advertising materials mentioning features or use of this software 14.\" must display the following acknowledgement: 15.\" This product includes software developed by the University of 16.\" California, Berkeley and its contributors. 17.\" 4. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" from: @(#)mt.1 6.7 (Berkeley) 7/28/91 34.\" $Id: mt.1,v 1.2 1993/08/01 07:48:21 mycroft Exp $ 35.\" 36.Dd July 28, 1991 37.Dt MT 1 38.Os BSD 4 39.Sh NAME 40.Nm mt 41.Nd magnetic tape manipulating program 42.Sh SYNOPSIS 43.Nm mt 44.Op Fl f Ar tapename 45.Ar command 46.Op Ar count 47.Sh DESCRIPTION 48.Nm Mt 49is used to give commands to a magnetic tape drive. 50By default 51.Nm mt 52performs the requested operation once. Operations 53may be performed multiple times by specifying 54.Ar count . 55Note 56that 57.Ar tapename 58must reference a raw (not block) tape device. 59.Pp 60The available commands are listed below. Only as many 61characters as are required to uniquely identify a command 62need be specified. 63.Bl -tag -width "eof, weof" 64.It Cm eof , weof 65Write 66.Ar count 67end-of-file marks at the current position on the tape. 68.It Cm fsf 69Forward space 70.Ar count 71files. 72.It Cm fsr 73Forward space 74.Ar count 75records. 76.It Cm bsf 77Back space 78.Ar count 79files. 80.It Cm bsr 81Back space 82.Ar count 83records. 84.It Cm rewind 85Rewind the tape 86(Count is ignored). 87.It Cm offline , rewoffl 88Rewind the tape and place the tape unit off-line 89(Count is ignored). 90.It Cm status 91Print status information about the tape unit. 92.El 93.Pp 94If a tape name is not specified, and the environment variable 95.Ev TAPE 96does not exist; 97.Nm mt 98uses the device 99.Pa /dev/rmt12 . 100.Pp 101.Nm Mt 102returns a 0 exit status when the operation(s) were successful, 1031 if the command was unrecognized, and 2 if an operation failed. 104.Sh ENVIRONMENT 105If the following environment variable exists, it is utilized by 106.Nm mt . 107.Bl -tag -width Fl 108.It Ev TAPE 109.Nm Mt 110checks the 111.Ev TAPE 112environment variable if the 113argument 114.Ar tapename 115is not given. 116.Sh FILES 117.Bl -tag -width /dev/rmt* -compact 118.It Pa /dev/rmt* 119Raw magnetic tape interface 120.El 121.Sh SEE ALSO 122.\".Xr mtio 4 , 123.Xr dd 1 , 124.Xr ioctl 2 , 125.Xr environ 7 126.Sh HISTORY 127The 128.Nm mt 129command appeared in 130.Bx 4.3 . 131.\" mt.1: mtio(4) missing 132