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