p Note that .Ar tapename must reference a raw (not block) tape device. If .Ar tapename is of the form .Qq host:tapename , or .Qq user@host:tapename , .Nm writes to the named tape device on the remote host using .Xr rmt 8 .
p The .Xr rmt 8 process on the remote host is typically initiated via .Xr rsh 1 , although an alternate method such as .Xr ssh 1 can be specified via the .Ev RCMD_CMD environment variable.
p The available commands are listed below. Only as many characters as are required to uniquely identify a command need be specified. l -tag -width "eof, weof" t Cm asf Absolute space to file .Ar count . t Cm eof , weof Write .Ar count end-of-file marks at the current position on the tape. t Cm fsf Forward space .Ar count files. t Cm fsr Forward space .Ar count records. t Cm bsf Back space .Ar count files. t Cm bsr Back space .Ar count records. t Cm rewind Rewind the tape (Count is ignored). t Cm offline , rewoffl Rewind the tape and place the tape unit off-line (Count is ignored). t Cm status Print status information about the tape unit (Count is ignored). t Cm retension Retensions the tape (if this operation is supported by the tape unit, count is ignored). t Cm erase Erases the tape (if this operation is supported by the tape unit, count is ignored). t Cm eew Enable or disabled early warning EOM behaviour. .Ar Count is set to nonzero to enable, zero to disable. t Cm eom Forward space to the end of the media (Count is ignored). t Cm blocksize Set the tape blocksize to .Ar count bytes. A .Ar count of zero sets variable blocksize. t Cm density Set the tape density code to .Ar count as specified in the .Tn SCSI-2 specification. t Cm rdspos Read the logical block position of the tape (not all tape drives support this feature, count is ignored). t Cm rdhpos Read the hardware block position of the tape (not all tape drives support this feature, count is ignored). t Cm setspos Set the logical block position of the tape to .Ar count (not all tape drives support this feature). t Cm sethpos Set the hardware block position of the tape to .Ar count (not all tape drives support this feature). t Cm compress If .Ar count is zero, disable compression. Otherwise enable compression (not all tape drives support this feature). .El
p If a tape name is not specified, and the environment variable .Ev TAPE is not set, then .Nm uses the device
p .Nm returns a 0 exit status when the operation(s) were successful, 1 if the command was unrecognized, and 2 if an operation failed. .Sh ENVIRONMENT If the following environment variables exist, they are utilized by .Nm "" . l -tag -width Fl t Ev TAPE .Nm uses device filename given in the .Ev TAPE environment variable if the .Ar tapename argument is not given. t Ev RCMD_CMD .Nm will use .Ev RCMD_CMD rather than
a /usr/bin/rsh to invoke .Xr rmt 8 on a remote machine. The full path name must be specified. .El .Sh FILES l -tag -width src/sys/dev/scsipi/scsi_tape.h -compact t Pa /dev/rst* Raw .Tn SCSI tape interface t Pa /dev/rmt* Raw magnetic tape interface t Pa src/sys/dev/scsipi/scsi_tape.h List of .Tn SCSI-2 density codes .El .Sh SEE ALSO .Xr dd 1 , .Xr ioctl 2 , .Xr mtio 4 , .Xr environ 7 .Sh BUGS The remote tape function is not implemented yet. .Sh HISTORY The .Nm utility appeared in x 4.3 .