This commit was manufactured by cvs2svn to create tag 'FreeBSD-release/1.1'.
[unix-history] / sbin / st / st.1
CommitLineData
8f5872cc
RG
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.\" @(#)mt.1 6.7 (Berkeley) 7/28/91
34.\"
35.Dd July 28, 1991
36.Dt ST 1
37.Os BSD 4
38.Sh NAME
39.Nm st
40.Nd magnetic tape manipulating program
41.Sh SYNOPSIS
42.Nm st
43.Op Fl f Ar tapename
44.Ar command
45.Op Ar count
46.Sh DESCRIPTION
47.Nm St
48is used to give commands to a magnetic tape drive.
49By default
50.Nm st
51performs the requested operation once. Operations
52may be performed multiple times by specifying
53.Ar count .
54Note
55that
56.Ar tapename
57must reference a raw (not block) tape device.
58.Pp
59The tape drive will hold density and blocking parameters until the next
c2714ef5 60unmount. In the case of rst0, this is immediately and is therefore of
8f5872cc
RG
61not much use with this device. In the case of nrst0 this
62may be after several commands when either an offline command is issued or
63rst0 is openned and closed. If parameters are to be held across
64unmounts, then they should be made to the control device for each
65mode.. i.e. the devices with a submode of 3 (minors 3,7,11,15 for example).
66It is suggested that the operator keep the control device unreadble
67and unwritable to normal system users, while giving them access to
68the non-rewind device (e.g. nrst0) on demand.
69.Pp
70The available commands are listed below. Only as many
71characters as are required to uniquely identify a command
72need be specified.
73.Bl -tag -width "eof, weof"
74.It Cm eof , weof
75Write
76.Ar count
77end-of-file marks at the current position on the tape.
78.It Cm fsf
79Forward space
80.Ar count
81files.
82.It Cm fsr
83Forward space
84.Ar count
85records.
86.It Cm bsf
87Back space
88.Ar count
89files.
90.It Cm bsr
91Back space
92.Ar count
93records.
94.It Cm rewind
95Rewind the tape
96(Count is ignored).
97.It Cm offline , rewoffl
98Rewind the tape and place the tape unit off-line (possibly eject)
99(Count is ignored).
100.It Cm blocksize
101Sets the block size characteristics of the openned
102device to value specified in
103.Ar count.
104A 0 means variable sized blocks, and anything else means fixed block,
105with blocksize as that of
106.Ar count.
107.It Cm density
108Set the density for the openned device (bits 2,3 of minor number)
109.Ar count
110density code as specified by the SCSI II specification. Valid values
111are from 0 to 0x17.
112.It The different density codes are as follows:
1130x0 default for device
114.br
1150xE reserved for ECMA
116.br
117
118Value Tracks Density(bpi) Code Type Reference Note
119.br
1200x1 9 800 NRZI R X3.22-1983 2
121.br
1220x2 9 1600 PE R X3.39-1986 2
123.br
1240x3 9 6250 GCR R X3.54-1986 2
125.br
1260x5 4/9 8000 GCR C X3.136-1986 1
127.br
1280x6 9 3200 PE R X3.157-1987 2
129.br
1300x7 4 6400 IMFM C X3.116-1986 1
131.br
1320x8 4 8000 GCR CS X3.158-1986 1
133.br
1340x9 18 37871 GCR C X3B5/87-099 2
135.br
1360xA 22 6667 MFM C X3B5/86-199 1
137.br
1380xB 4 1600 PE C X3.56-1986 1
139.br
1400xC 24 12690 GCR C HI-TC1 1,5
141.br
1420xD 24 25380 GCR C HI-TC2 1,5
143.br
1440xF 15 10000 GCR C QIC-120 1,5
145.br
1460x10 18 10000 GCR C QIC-150 1,5
147.br
1480x11 26 16000 GCR C QIC-320(525?) 1,5
149.br
1500x12 30 51667 RLL C QIC-1350 1,5
151.br
1520x13 1 61000 DDS CS X3B5/88-185A 4
153.br
1540x14 1 43245 RLL CS X3.202-1991 4
155.br
1560x15 1 45434 RLL CS ECMA TC17 4
157.br
1580x16 48 10000 MFM C X3.193-1990 1
159.br
1600x17 48 42500 MFM C X3B5/91-174 1
161.br
162
163where Code means:
164.br
165NRZI Non Return to Zero, change on ones
166.br
167GCR Group Code Recording
168.br
169PE Phase Encoded
170.br
171IMFM Inverted Modified Frequency Modulation
172.br
173MFM Modified Frequency Modulation
174.br
175DDS Dat Data Storage
176.br
177RLL Run Length Encoding
178.br
179
180where Type means:
181.br
182R Real-to-Real
183.br
184C Cartridge
185.br
186CS cassette
187.br
188
189where Notes means:
190.br
1911 Serial Recorded
192.br
1932 Parallel Recorded
194.br
1953 Old format know as QIC-11
196.br
1974 Helical Scan
198.br
1995 Not ANSI standard, rather industry standard.
200.br
201
202.It Cm status
203Print status information about the tape unit.
204Information is printed out about the present active parameters and
205also the four Operating modes available.
206.El
207.Pp
208If a tape name is not specified, and the environment variable
209.Ev TAPE
210does not exist;
211.Nm st
212uses the device
213.Pa /dev/nrst0 .
214.Pp
215.Nm St
216returns a 0 exit status when the operation(s) were successful,
2171 if the command was unrecognized, and 2 if an operation failed.
218.Sh ENVIRONMENT
219If the following environment variable exists, it is utilized by
220.Nm st .
221.Bl -tag -width Fl
222.It Ev TAPE
223.Nm St
224checks the
225.Ev TAPE
226environment variable if the
227argument
228.Ar tapename
229is not given.
230.Sh FILES
231.Bl -tag -width /dev/rmt* -compact
232.It Pa /dev/rst*
233Raw magnetic tape interface
234.El
235.Sh SEE ALSO
236.\".Xr mtio 4 ,
237.Xr st 4 ,
238.Xr dd 1 ,
239.Xr ioctl 2 ,
240.Xr environ 7
241.Sh HISTORY
242The
243.Nm st
244command appeared in 386BSD 0.1.
245
246.\" mt.1: mtio(4) missing