1 MT(1) User Commands MT(1) 2 3 4 5 NAME 6 mt - magnetic tape control 7 8 SYNOPSIS 9 mt [-f tapename] command... [count] 10 11 12 DESCRIPTION 13 The mt utility sends commands to a magnetic tape drive. If -f tapename 14 is not specified, the environment variable TAPE is used. If TAPE does 15 not exist, mt uses the device /dev/rmt/0n. 16 17 OPTIONS 18 The following options are supported: 19 20 -f tapename 21 Specifies the raw tape device. 22 23 24 OPERANDS 25 The following operands are supported: 26 27 count 28 The number of times that the requested operation is to be 29 performed. By default, mt performs command once. Multiple 30 operations of command can be performed by specifying count. 31 32 33 command 34 The following available commands that can be sent to a 35 magnetic tape drive are supported. Only as many characters 36 as are required to uniquely identify a command need be 37 specified. 38 39 asf 40 Specifies absolute space to count file number. 41 This is equivalent to a rewind followed by a fsf 42 count. 43 44 45 bsf 46 Back spaces over count EOF marks. The tape is 47 positioned on the beginning-of-tape side of the 48 EOF mark. 49 50 51 bsr 52 Back spaces count records. 53 54 55 bssf 56 Back spaces over the requested number of 57 sequential file marks. Sequential file marks are 58 where the file marks are one right after the other 59 with no other blocks of any kind between the file 60 marks. The number argument specifies how many 61 sequential file marks to which to space. For 62 example, bssf 4 searches backwards to the first 63 place where there are 4 sequential file marks and 64 positions to the BOP side of the 4th file mark. 65 66 This command is not supported by all drives. 67 68 69 eof 70 weof 71 Writes count EOF marks at the current position on 72 the tape. 73 74 75 fsf 76 Forward spaces over count EOF marks. The tape is 77 positioned on the first block of the file. 78 79 80 fsr 81 Forward spaces count records. 82 83 84 fssf 85 Forward spaces the over requested number of 86 sequential file marks. Sequential file marks are 87 where the file marks are one right after the other 88 with no other blocks of any kind between the file 89 marks. The number argument specifies how many 90 sequential file marks to which to space. For 91 example, fssf 4 searches forwards to the first 92 place where there are 4 sequential file marks and 93 positions after the 4th file mark. 94 95 This command is not supported by all drives. 96 97 98 load 99 Requests drive load and thread current media. Not 100 supported by all drives. 101 102 103 lock 104 Prevents media removal. 105 106 107 nbsf 108 Back spaces count files. The tape is positioned on 109 the first block of the file. This is equivalent to 110 count+1 bsfs followed by one fsf. 111 112 113 seek 114 Positions to requested logical tape position. 115 116 117 tell 118 Gets and prints current logical tape position. 119 120 121 unlock 122 Allows media removal. 123 124 If count is specified with any of the following commands, 125 the count is ignored and the command is performed only once. 126 127 config 128 Reads the drives current configuration from 129 the driver and displays it in st.conf 130 format. See st(7D) for definition of fields 131 and there meanings. 132 133 134 eom 135 Spaces to the end of recorded media on the 136 tape. This is useful for appending files 137 onto previously written tapes. 138 139 140 erase 141 Erases the entire tape. 142 143 Some tape drives have option settings where 144 only portions of the tape can be erased. Be 145 sure to select the correct setting to erase 146 the whole tape. Erasing a tape can take a 147 long time depending on the device and/or 148 tape. Refer to the device specific manual 149 for time details. 150 151 152 forcereserve 153 Attempts to break a SCSI II reserve issued 154 by another initiator. When this command 155 completes, the drive is not reserved for the 156 current initiator, but is available for use. 157 This command can be only be executed by 158 those with super-user privileges. 159 160 161 offline 162 rewoffl 163 Rewinds the tape and, if appropriate, takes 164 the drive unit off-line by unloading the 165 tape. 166 167 168 release 169 Re-establishes the default behavior of 170 releasing at close. 171 172 173 reserve 174 Allows the tape drive to remain reserved 175 after closing the device. The drive must 176 then be explicitly released. 177 178 179 retension 180 Rewinds the cartridge tape completely, then 181 winds it forward to the end of the reel and 182 back to beginning-of-tape to smooth out tape 183 tension. 184 185 186 rewind 187 Rewinds the tape. 188 189 190 status 191 Prints status information about the tape 192 unit. 193 194 Status information can include the sense key 195 reported by the drive, the residual and 196 retries for the last operation, the current 197 tape position reported in file number, and 198 the number of blocks from the beginning of 199 that file. It might also report that WORM 200 media is loaded in that drive. 201 202 203 204 EXIT STATUS 205 0 206 All operations were successful. 207 208 209 1 210 Command was unrecognized or mt was unable to open the specified 211 tape drive. 212 213 214 2 215 An operation failed. 216 217 218 FILES 219 /dev/rmt/* 220 magnetic tape interface 221 222 223 SEE ALSO 224 tar(1), tcopy(1), ar.h(3HEAD), attributes(5), mtio(7I), st(7D) 225 226 BUGS 227 Not all devices support all options. Some options are hardware- 228 dependent. Refer to the corresponding device manual page. 229 230 231 mt is architecture sensitive. Heterogeneous operation (that is, SPARC 232 to x86 or the reverse) is not supported. 233 234 235 236 June 21, 2007 MT(1)