GNU Info

Info Node: ( invocation

( invocation

Next: install invocation Prev: cp invocation Up: Basic operations
Enter node , (file) or (file)node

`dd': Convert and copy a file

   `dd' copies a file (from standard input to standard output, by
default) with a changeable I/O block size, while optionally performing
conversions on it.  Synopsis:

     dd [OPTION]...

   The program accepts the following options.  Also see Note: Common

   The numeric-valued options below (BYTES and BLOCKS) can be followed
by a multiplier: `b'=512, `c'=1, `w'=2, `xM'=M, or any of the standard
block size suffixes like `k'=1024 (Note: Block size).

   Use different `dd' invocations to use different block sizes for
skipping and I/O.  For example, the following shell commands copy data
in 512 kB blocks between a disk and a tape, but do not save or restore a
4 kB label at the start of the disk:

     # Copy all but the label from disk to tape.
     (dd bs=4k skip=1 count=0 && dd bs=512k) <$disk >$tape
     # Copy from tape back to disk, but leave the disk label alone.
     (dd bs=4k seek=1 count=0 && dd bs=512k) <$tape >$disk

     Read from FILE instead of standard input.

     Write to FILE instead of standard output.  Unless `conv=notrunc'
     is given, `dd' truncates FILE to zero bytes (or the size specified
     with `seek=').

     Read BYTES bytes at a time.

     Write BYTES bytes at a time.

     Both read and write BYTES bytes at a time.  This overrides `ibs'
     and `obs'.

     Convert BYTES bytes at a time.

     Skip BLOCKS `ibs'-byte blocks in the input file before copying.

     Skip BLOCKS `obs'-byte blocks in the output file before copying.

     Copy BLOCKS `ibs'-byte blocks from the input file, instead of
     everything until the end of the file.

     Convert the file as specified by the CONVERSION argument(s).  (No
     spaces around any comma(s).)


          Convert EBCDIC to ASCII.

          Convert ASCII to EBCDIC.

          Convert ASCII to alternate EBCDIC.

          For each line in the input, output `cbs' bytes, replacing the
          input newline with a space and padding with spaces as

          Replace trailing spaces in each `cbs'-sized input block with a

          Change uppercase letters to lowercase.

          Change lowercase letters to uppercase.

          Swap every pair of input bytes.  GNU `dd', unlike others,
          works when an odd number of bytes are read--the last byte is
          simply copied (since there is nothing to swap it with).

          Continue after read errors.

          Do not truncate the output file.

          Pad every input block to size of `ibs' with trailing zero
          bytes.  When use with `block' or `unblock', pad with spaces
          instead of zero bytes.

automatically generated by info2www version