man(1) Manual page archive


     DD(1)                                                       DD(1)

     NAME
          dd, dblbuf - convert and copy a file

     SYNOPSIS
          dd [ option=value ]

          dblbuf [ -b blocksize ] [ file ]

     DESCRIPTION
          Dd copies the specified input file to the specified output
          with possible conversions.  The standard input and output
          are used by default.  The input and output block size may be
          specified to take advantage of raw physical I/O.  The
          options are

          if=file Set the input file (standard input by default).

          of=file Set the output file (standard output by default).

          ibs=n   Set input block size to n bytes (default 512).

          obs=n   Set output block size (default 512).

          bs=n    Set both input and output block size, superseding
                  ibs and obs. If no conversion is specified, preserve
                  the input block size instead of packing short blocks
                  into the output buffer.  This is particularly effi-
                  cient since no in-core copy need be done.

          cbs=n   Set conversion buffer size.

          skip=n  Skip n input records before copying.

          iseek=n Seek n records forward on input file before copying.

          files=n Copy and concatenate n input files (makes sense only
                  where input is a magnetic tape or similar device).

          oseek=n Aeek n records from beginning of output file before
                  copying.

          count=n Copy only n input records.

          conv=ascii    Convert EBCDIC to ASCII.
               ebcdic   Convert ASCII to EBCDIC.
               ibm      Like ebcdic but with a slightly different
                        character map.
               block    Convert variable length ASCII records to fixed
                        length.
               unblock  Convert fixed length ASCII records to variable

     DD(1)                                                       DD(1)

                        length.
               lcase    Map alphabetics to lower case.
               ucase    Map alphabetics to upper case.
               swab     Swap every pair of bytes.
               noerror  Do not stop processing on an error.
               sync     Pad every input record to ibs bytes.

          Where sizes are specified, a number of bytes is expected.  A
          number may end with `k', `b', or `w' to specify multiplica-
          tion by 1024, 512, or 2 respectively; a pair of numbers may
          be separated by `x' to indicate a product.  Multiple conver-
          sions may be specified in the style: `conv=ebcdic,ucase'.

          `Cbs' is used only if `ascii', `unblock', `ebcdic', `ibm',
          or `block' conversion is specified.  In the first two cases,
          n characters are copied into the conversion buffer, any
          specified character mapping is done, trailing blanks are
          trimmed and new-line is added before sending the line to the
          output.  In the latter three cases, characters are read into
          the conversion buffer and blanks are added to make up an
          output record of size n. If `cbs' is unspecified or zero,
          the `ascii', `ebcdic', and `ibm' options convert the charac-
          ter set without changing the block structure of the input
          file; the `unblock' and `block' options become a simple file
          copy.

          Dblbuf copies the named file, or the standard input if no
          file is specified, to the standard output.  Output is writ-
          ten in blocks matching the input up to the given blocksize,
          or 32768 bytes if not specified.

          Dblbuf uses multiple processes to run faster, which is par-
          ticularly useful in dealing with a device such as a stream-
          ing tape drive.

     EXAMPLES
          dd  if=/dev/rmt0  of=x  ibs=800  cbs=80  conv=ascii,lcase
               Read an EBCDIC tape blocked ten 80-byte EBCDIC card
               images per record into an ASCII file.  Note the use of
               raw magtape to handle arbitrary record sizes.

          tar cf /dev/stdout /usr | dblbuf >/dev/rmt1
               Copy the directory to tape on

     SEE ALSO
          cp(1), tar(1), cpio(1)

     DIAGNOSTICS
          Dd reports the number of full + partial input and output
          blocks handled.

     BUGS

     DD(1)                                                       DD(1)

          The ASCII/EBCDIC conversion tables for dd were taken from
          the 256-character standard in CACM Nov, 1968.  The `ibm'
          conversion, while less blessed as a standard, corresponds
          better to certain IBM print train conventions.  There is no
          universal solution.
          Options if and of are verbose equivalents of < and >.