tcopy(1) [freebsd man page]
TCOPY(1) BSD General Commands Manual TCOPY(1) NAME
tcopy -- copy and/or verify mag tapes SYNOPSIS
tcopy [-cvx] [-s maxblk] [src [dest]] DESCRIPTION
The tcopy utility is designed to copy magnetic tapes. The only assumption made about the tape layout is that there are two sequential EOF marks at the end. By default, the tcopy utility will print information about the sizes of records and files found on the /dev/sa0 tape, or on the tape specified by the src argument. If a destination tape is also specified by the dest argument, a copy of the source tape will be made. The blocking on the destination tape will be identical to that used on the source tape. Copying a tape will yield the same program output as if just printing the sizes. The following options are available: -c Copy src to dest and then verify that the two tapes are identical. -s maxblk Specify a maximum block size, maxblk. -v Given the two tapes src and dest, verify that they are identical. -x Output all informational messages to the standard error instead of the standard output. This option is useful when dest is given as /dev/stdout. SEE ALSO
mt(1), mtio(4) HISTORY
The tcopy command appeared in 4.3BSD. BUGS
Writing an image of a tape to a file does not preserve much more than the raw data. Block size(s) and tape EOF marks are lost which would otherwise be preserved in a tape-to-tape copy. End of data (EOD) is determined by two sequential EOF marks with no data between them. There used to be old systems which typically wrote three EOF's between tape files. The tcopy utility will erroneously stop copying early in this case. When using the copy/verify option -c, tcopy does not rewind the tapes prior to start. A rewind is performed after writing, prior to the ver- ification stage. If one does not start at the beginning-of-tape (BOT) then the comparison may not be of the intended data. BSD
December 20, 2006 BSD
Check Out this Related Man Page
mt(1) General Commands Manual mt(1) Name mt - magnetic tape manipulating program Syntax mt [-f tapename] command [count] Description The command permits the operation of a magnetic tape drive. Options The -f flag option uses the specified tape device (next argument) in place of either that tape device defined by your TAPE environment variable (.login or .profile) or /dev/nrmt0h. Some operations may be performed multiple times by specifying count. By default, performs the requested operation once. The command argument defines the operation to be performed. Only as many characters as are required to uniquely identify a command need be specified. The following is a list of commands: bsf Backspace count files. bsr Backspace count records. cache Allows to use the cache buffer on a tape drive that has the cache buffer feature. clhrdsf Clear hardware/software problem. Works with tape drives which use the TMSCP tape controller interface This command is restricted to root access only. clserex Clear serious exception. Works with tape drives which use the TMSCP tape controller interface clsub Clear subsystem. Works with tape drives which use the TMSCP tape controller interface This command is restricted to root access only. eof, weof Write count end-of-file marks at the current position on the tape. eotdis Disable end-of-tape detection. When the end of tape is reached, the tape will run off the reel. Only the superuser can issue this command. The command remains in effect for the device until end-of-tape detection is enabled with the eoten command. eoten Enable end-of-tape detection. When the end-of-tape markers are reached, the tape is halted on the reel, between the two end-of-tape markers. Only the superuser can issue this command. The command remains in effect for the device until end-of-tape detection is disabled with the eotdis command. This is the default mode after a system boot. fsf Forward-space count files. fsr Forward-space count records. nocache Disables the use of the cache buffer for any tape drive that has the cache buffer feature. offline, rewoffl Rewind the tape and place the tape unit off-line. retension Retensions the tape. Retension means moving the tape one complete pass between EOT and BOT. rewind Rewind the tape. status Print status information about the tape unit. Examples This example shows how to rewind the tape mt -f /dev/rmt0l rewind This example shows how to backspace the tape nmt1h three files: mt -f /dev/nrmt1h bsf 3 This example shows how to write two end-of-file marks at the current position on tape nmt6h: mt -f /dev/nrmt6h eof 2 Return Values In shell scripts, returns a 0 exit status when the operation(s) were successful, 1 if the command was unrecognized, and 2 if an operation failed. Files /dev/rmt?h or /dev/rmt?l Raw magnetic tape interface with rewind when closed /dev/nmt?h or /dev/nmt?l Raw magnetic tape interface with no rewind when closed See Also dd(1), tar(1), ioctl(2), mtio(4), tms(4), environ(7) mt(1)