BSD 4_4 release
[unix-history] / usr / src / bin / dd / dd.1
index 92205e7..d47462c 100644 (file)
@@ -1,14 +1,40 @@
-.\" Copyright (c) 1990 The Regents of the University of California.
-.\" All rights reserved.
+.\" Copyright (c) 1990, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\" This code is derived from software contributed to Berkeley by
 .\" Keith Muller of the University of California, San Diego.
 .\"
 .\"
 .\" This code is derived from software contributed to Berkeley by
 .\" Keith Muller of the University of California, San Diego.
 .\"
-.\" %sccs.include.redist.roff%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
 .\"
 .\"
-.\"     @(#)dd.1       6.5 (Berkeley) %G%
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
 .\"
 .\"
-.Dd 
+.\"     @(#)dd.1       8.1 (Berkeley) 6/30/93
+.\"
+.Dd June 30, 1993
 .Dt DD 1
 .Os
 .Sh NAME
 .Dt DD 1
 .Os
 .Sh NAME
@@ -39,8 +65,7 @@ and
 operands.
 If no conversion values other than
 .Cm noerror ,
 operands.
 If no conversion values other than
 .Cm noerror ,
-.Cm notrunc ,
-.Cm swab
+.Cm notrunc
 or
 .Cm sync
 are specified, then each input block is copied to the output as a
 or
 .Cm sync
 are specified, then each input block is copied to the output as a
@@ -96,7 +121,9 @@ using the tape
 .Xr ioctl 2
 function calls.
 If the seek operation is past the end of file, space from the current
 .Xr ioctl 2
 function calls.
 If the seek operation is past the end of file, space from the current
-end of file to the specified offset is filled with blocks of NUL bytes.
+end of file to the specified offset is filled with blocks of
+.Tn NUL
+bytes.
 .It Cm skip= Ns Ar n
 Skip
 .Va n
 .It Cm skip= Ns Ar n
 Skip
 .Va n
@@ -119,15 +146,27 @@ is one of the symbols from the following list.
 .It Cm ascii , oldascii
 The same as the
 .Cm unblock
 .It Cm ascii , oldascii
 The same as the
 .Cm unblock
-value except that characters are translated from ECBDIC to ASCII before the
+value except that characters are translated from
+.Tn ECBDIC
+to
+.Tn ASCII
+before the
 records are converted.
 records are converted.
-There are two conversion maps for ASCII.
+(These values imply
+.Cm unblock
+if the operand
+.Cm cbs
+is also specified.)
+There are two conversion maps for
+.Tn ASCII .
 The value
 .Cm ascii
 specifies the recommended one which is compatible with System V.
 The value
 .Cm oldascii
 The value
 .Cm ascii
 specifies the recommended one which is compatible with System V.
 The value
 .Cm oldascii
-specifies the one used in historic AT&T and pre-4.4BSD systems.
+specifies the one used in historic
+.Tn AT&T
+and pre-4.3BSD-reno systems.
 .It Cm block
 Treats the input as a sequence of newline or end-of-file terminated variable
 length records independent of input and output block boundaries.
 .It Cm block
 Treats the input as a sequence of newline or end-of-file terminated variable
 length records independent of input and output block boundaries.
@@ -139,37 +178,53 @@ operand.
 Input records shorter than the conversion record size are padded with spaces.
 Input records longer than the conversion record size are truncated.
 The number of truncated input records, if any, are reported to the standard
 Input records shorter than the conversion record size are padded with spaces.
 Input records longer than the conversion record size are truncated.
 The number of truncated input records, if any, are reported to the standard
-error at the completion of the copy.
+error output at the completion of the copy.
 .It Cm ebcdic , ibm , oldebcdic , oldibm
 The same as the
 .Cm block
 .It Cm ebcdic , ibm , oldebcdic , oldibm
 The same as the
 .Cm block
-value except that characters are translated from ASCII to EBCDIC after the
+value except that characters are translated from
+.Tn ASCII
+to
+.Tn EBCDIC
+after the
 records are converted.
 records are converted.
-There are four conversion maps for EBCDIC.
+(These values imply
+.Cm block
+if the operand
+.Cm cbs
+is also specified.)
+There are four conversion maps for
+.Tn EBCDIC .
 The value
 .Cm ebcdic
 The value
 .Cm ebcdic
-specifies the recommended one which is compatible with System V.
+specifies the recommended one which is compatible with
+.At V .
 The value
 .Cm ibm
 The value
 .Cm ibm
-is a slightly different mapping, which is compatible with the System V
+is a slightly different mapping, which is compatible with the
+.At V
 .Cm ibm
 value.
 The values
 .Cm oldebcdic
 and
 .Cm oldibm
 .Cm ibm
 value.
 The values
 .Cm oldebcdic
 and
 .Cm oldibm
-are maps used in historic AT&T and pre-4.4BSD systems.
+are maps used in historic
+.Tn AT&T
+and pre-4.3BSD-reno systems.
 .It Cm lcase
 Transform uppercase characters into lowercase characters.
 .It Cm noerror
 Do not stop processing on an input error.
 When an input error occurs, a diagnostic message followed by the current
 .It Cm lcase
 Transform uppercase characters into lowercase characters.
 .It Cm noerror
 Do not stop processing on an input error.
 When an input error occurs, a diagnostic message followed by the current
-input and output block counts will be written to standard error in the
-same format as the standard completion message.
+input and output block counts will be written to the standard error output
+in the same format as the standard completion message.
 If the
 .Cm sync
 conversion is also specified, any missing input data will be replaced
 If the
 .Cm sync
 conversion is also specified, any missing input data will be replaced
-with NUL bytes (or with spaces if a block oriented conversion value was
+with
+.Tn NUL
+bytes (or with spaces if a block oriented conversion value was
 specified) and processed as a normal input buffer.
 If the
 .Cm sync
 specified) and processed as a normal input buffer.
 If the
 .Cm sync
@@ -192,7 +247,9 @@ ignored during swapping.
 .It Cm sync
 Pad every input block to the input buffer size.
 Spaces are used for pad bytes if a block oriented conversion value is
 .It Cm sync
 Pad every input block to the input buffer size.
 Spaces are used for pad bytes if a block oriented conversion value is
-specified, otherwise NUL bytes are used.
+specified, otherwise
+.Tn NUL
+bytes are used.
 .It Cm ucase
 Transform lowercase characters into uppercase characters.
 .It Cm unblock
 .It Cm ucase
 Transform lowercase characters into uppercase characters.
 .It Cm unblock
@@ -214,8 +271,9 @@ Two or more numbers may be separated by an ``x'' to indicate a product.
 .Pp
 When finished,
 .Nm dd
 .Pp
 When finished,
 .Nm dd
-displays the number of complete and partial input and output blocks
-and truncated input records to the standard error output.
+displays the number of complete and partial input and output blocks,
+truncated input records and odd-length byte-swapping blocks to the
+standard error output.
 A partial input block is one where less than the input block size
 was read.
 A partial output block is one where less than the output block size
 A partial input block is one where less than the input block size
 was read.
 A partial output block is one where less than the output block size
@@ -236,20 +294,26 @@ block size.
 .Pp
 If
 .Nm dd
 .Pp
 If
 .Nm dd
-receives a SIGINFO signal, the current input and output block counts will
-be written to standard error in the same format as the standard completion
-message.
+receives a
+.Dv SIGINFO
+(see the ``status'' argument for
+.Xr stty 1 )
+signal, the current input and output block counts will
+be written to the standard error output
+in the same format as the standard completion message.
 If
 .Nm dd
 If
 .Nm dd
-receives a SIGINT signal, the current input and output block counts will
-be written to standard error in the same format as the standard completion
-message and
+receives a
+.Dv SIGINT
+signal, the current input and output block counts will
+be written to the standard error output
+in the same format as the standard completion message and
 .Nm dd
 will exit.
 .Pp
 The
 .Nm dd
 .Nm dd
 will exit.
 .Pp
 The
 .Nm dd
-utility exits 0 on success an >0 if an error occurred.
+utility exits 0 on success and >0 if an error occurred.
 .Sh SEE ALSO
 .Xr cp 1 ,
 .Xr mt 1 ,
 .Sh SEE ALSO
 .Xr cp 1 ,
 .Xr mt 1 ,
@@ -270,4 +334,6 @@ operand and the
 .Cm oldebcdic
 and
 .Cm oldibm
 .Cm oldebcdic
 and
 .Cm oldibm
-values are extensions to the POSIX standard.
+values are extensions to the
+.Tn POSIX
+standard.