Print this page
    
manpage lint.
    
      
        | Split | Close | 
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/man/man1m/dd.1m
          +++ new/usr/src/man/man1m/dd.1m
   1    1  '\" te
   2    2  .\" Copyright (c) 2014, Joyent, Inc.  All rights Reserved.
   3    3  .\" Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
   4    4  .\" Copyright 1989 AT&T
   5    5  .\" Portions Copyright (c) 1995, Sun Microsystems, Inc.  All Rights Reserved
   6    6  .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   7    7  .\" http://www.opengroup.org/bookstore/.
   8    8  .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   9    9  .\"  This notice shall appear on any product containing this material.
  10   10  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
  11   11  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
  12   12  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  13   13  .TH DD 1M "Jan 04, 2014"
  14   14  .SH NAME
  15   15  dd \- convert and copy a file
  16   16  .SH SYNOPSIS
  17   17  .LP
  18   18  .nf
  19   19  \fB/usr/bin/dd\fR [\fIoperand=value\fR]...
  20   20  .fi
  21   21  
  22   22  .SH DESCRIPTION
  23   23  .sp
  24   24  .LP
  25   25  The \fBdd\fR utility copies the specified input file to the specified output
  26   26  with possible conversions. The standard input and output are used by default.
  27   27  The input and output block sizes may be specified to take advantage of raw
  28   28  physical I/O. Sizes are specified in bytes; a number may end with \fBk\fR,
  29   29  \fBb\fR, or \fBw\fR to specify multiplication by 1024, 512, or 2, respectively.
  30   30  Numbers may also be separated by \fBx\fR to indicate multiplication.
  31   31  .sp
  32   32  .LP
  33   33  The \fBdd\fR utility reads the input one block at a time, using the specified
  34   34  input block size. \fBdd\fR then processes the block of data actually returned,
  35   35  which could be smaller than the requested block size. \fBdd\fR applies any
  36   36  conversions that have been specified and writes the resulting data to the
  37   37  output in blocks of the specified output block size.
  38   38  .sp
  39   39  .LP
  40   40  \fBcbs\fR is used only if \fBascii\fR, \fBasciib\fR, \fBunblock\fR,
  41   41  \fBebcdic\fR, \fBebcdicb\fR, \fBibm\fR, \fBibmb\fR, or \fBblock\fR conversion
  42   42  is specified. In the first two cases, \fBcbs\fR characters are copied into the
  43   43  conversion buffer, any specified character mapping is done, trailing blanks are
  44   44  trimmed, and a \fBNEWLINE\fR is added before sending the line to output. In the
  45   45  last three cases, characters up to \fBNEWLINE\fR are read into the conversion
  46   46  buffer and blanks are added to make up an output record of size \fBcbs\fR.
  47   47  \fBASCII\fR files are presumed to contain \fBNEWLINE\fR characters. If
  48   48  \fBcbs\fR is unspecified or \fB0\fR, the \fBascii\fR, \fBasciib\fR,
  49   49  \fBebcdic\fR, \fBebcdicb\fR, \fBibm\fR, and \fBibmb\fR options convert the
  50   50  character set without changing the input file's block structure. The
  51   51  \fBunblock\fR and \fBblock\fR options become a simple file copy.
  52   52  .sp
  53   53  .LP
  54   54  After completion, \fBdd\fR reports the number of whole and partial input and
  55   55  output blocks.
  56   56  .SH OPERANDS
  57   57  .sp
  58   58  .LP
  59   59  The following operands are supported:
  60   60  .sp
  61   61  .ne 2
  62   62  .na
  63   63  \fB\fBif=\fR\fIfile\fR\fR
  64   64  .ad
  65   65  .sp .6
  66   66  .RS 4n
  67   67  Specifies the input path. Standard input is the default.
  68   68  .RE
  69   69  
  70   70  .sp
  71   71  .ne 2
  72   72  .na
  73   73  \fB\fBof=\fR\fIfile\fR\fR
  74   74  .ad
  75   75  .sp .6
  76   76  .RS 4n
  77   77  Specifies the output path. Standard output is the default. If the
  78   78  \fBseek=\fR\fBexpr\fR conversion is not also specified, the output file will be
  79   79  truncated before the copy begins, unless \fBconv=notrunc\fR is specified. If
  80   80  \fBseek=\fR\fBexpr\fR is specified, but \fBconv=notrunc\fR is not, the effect
  81   81  of the copy will be to preserve the blocks in the output file over which
  82   82  \fBdd\fR seeks, but no other portion of the output file will be preserved. (If
  83   83  the size of the seek plus the size of the input file is less than the previous
  84   84  size of the output file, the output file is shortened by the copy.)
  85   85  .RE
  86   86  
  87   87  .sp
  88   88  .ne 2
  89   89  .na
  90   90  \fB\fBibs=\fR\fIn\fR\fR
  91   91  .ad
  92   92  .sp .6
  93   93  .RS 4n
  94   94  Specifies the input block size in \fIn\fR bytes (default is \fB512\fR).
  95   95  .RE
  96   96  
  97   97  .sp
  98   98  .ne 2
  99   99  .na
 100  100  \fB\fBobs=\fR\fIn\fR\fR
 101  101  .ad
 102  102  .sp .6
 103  103  .RS 4n
 104  104  Specifies the output block size in \fIn\fR bytes (default is \fB512\fR).
 105  105  .RE
 106  106  
 107  107  .sp
 108  108  .ne 2
 109  109  .na
 110  110  \fB\fBbs=\fR\fIn\fR\fR
 111  111  .ad
 112  112  .sp .6
 113  113  .RS 4n
 114  114  Sets both input and output block sizes to \fIn\fR bytes, superseding \fBibs=\fR
 115  115  and \fBobs=\fR. If no conversion other than \fBsync\fR,\fB noerror\fR, and
 116  116  \fBnotrunc\fR is specified, each input block is copied to the output as a
 117  117  single block without aggregating short blocks.
 118  118  .RE
 119  119  
 120  120  .sp
 121  121  .ne 2
 122  122  .na
 123  123  \fB\fBcbs=\fR\fIn\fR\fR
 124  124  .ad
 125  125  .sp .6
 126  126  .RS 4n
 127  127  Specifies the conversion block size for \fBblock\fR and \fBunblock\fR in bytes
 128  128  by \fIn\fR (default is \fB0\fR). If \fBcbs=\fR is omitted or given a value of
 129  129  \fB0\fR, using \fBblock\fR or \fBunblock\fR produces unspecified results.
 130  130  .sp
 131  131  This option is used only if \fBASCII\fR or \fBEBCDIC\fR conversion is
 132  132  specified. For the \fBascii\fR and \fBasciib\fR operands, the input is handled
 133  133  as described for the \fBunblock\fR operand except that characters are converted
 134  134  to \fBASCII\fR before the trailing \fBSPACE\fR characters are deleted. For the
 135  135  \fBebcdic\fR, \fBebcdicb\fR, \fBibm\fR, and \fBibmb\fR operands, the input is
 136  136  handled as described for the \fBblock\fR operand except that the characters are
 137  137  converted to \fBEBCDIC\fR or IBM \fBEBCDIC\fR after the trailing \fBSPACE\fR
 138  138  characters are added.
 139  139  .RE
 140  140  
 141  141  .sp
 142  142  .ne 2
 143  143  .na
 144  144  \fB\fBfiles=\fR\fIn\fR\fR
 145  145  .ad
 146  146  .sp .6
 147  147  .RS 4n
 148  148  Copies and concatenates \fIn\fR input files before terminating (makes sense
 149  149  only where input is a magnetic tape or similar device).
 150  150  .RE
 151  151  
 152  152  .sp
 153  153  .ne 2
 154  154  .na
 155  155  \fB\fBskip=\fR\fIn\fR\fR
 156  156  .ad
 157  157  .sp .6
 158  158  .RS 4n
 159  159  Skips \fIn\fR input blocks (using the specified input block size) before
 160  160  starting to copy. On seekable files, the implementation reads the blocks or
 161  161  seeks past them. On non-seekable files, the blocks are read and the data is
 162  162  discarded.
 163  163  .RE
 164  164  
 165  165  .sp
 166  166  .ne 2
 167  167  .na
 168  168  \fB\fBiseek=\fR\fIn\fR\fR
 169  169  .ad
 170  170  .sp .6
 171  171  .RS 4n
 172  172  Seeks \fIn\fR blocks from beginning of input file before copying (appropriate
 173  173  for disk files, where \fBskip\fR can be incredibly slow).
 174  174  .RE
 175  175  
 176  176  .sp
 177  177  .ne 2
 178  178  .na
 179  179  \fB\fBoseek=\fR\fIn\fR\fR
 180  180  .ad
 181  181  .sp .6
 182  182  .RS 4n
 183  183  Seeks \fIn\fR blocks from beginning of output file before copying.
 184  184  .RE
 185  185  
 186  186  .sp
 187  187  .ne 2
 188  188  .na
 189  189  \fB\fBseek=\fR\fIn\fR\fR
 190  190  .ad
 191  191  .sp .6
 192  192  .RS 4n
 193  193  Skips \fIn\fR blocks (using the specified output block size) from beginning of
 194  194  output file before copying. On non-seekable files, existing blocks are read and
 195  195  space from the current end-of-file to the specified offset, if any, is filled
 196  196  with null bytes. On seekable files, the implementation seeks to the specified
 197  197  offset or reads the blocks as described for non-seekable files.
 198  198  .RE
 199  199  
 200  200  .sp
 201  201  .ne 2
 202  202  .na
 203  203  \fB\fBcount=\fR\fIn\fR\fR
 204  204  .ad
 205  205  .sp .6
 206  206  .RS 4n
 207  207  Copies only \fIn\fR input blocks.
 208  208  .RE
 209  209  
 210  210  .sp
 211  211  .ne 2
 212  212  .na
 213  213  \fB\fBconv=\fR\fIvalue\fR[\fB,\fR\fIvalue\fR.\|.\|.\|]\fR
 214  214  .ad
 215  215  .sp .6
 216  216  .RS 4n
 217  217  Where \fIvalue\fRs are comma-separated symbols from the following list:
 218  218  .sp
 219  219  .ne 2
 220  220  .na
 221  221  \fB\fBascii\fR\fR
 222  222  .ad
 223  223  .RS 11n
 224  224  Converts \fBEBCDIC\fR to \fBASCII\fR.
 225  225  .RE
 226  226  
 227  227  .sp
 228  228  .ne 2
 229  229  .na
 230  230  \fB\fBasciib\fR\fR
 231  231  .ad
 232  232  .RS 11n
 233  233  Converts \fBEBCDIC\fR to \fBASCII\fR using \fBBSD\fR-compatible character
 234  234  translations.
 235  235  .RE
 236  236  
 237  237  .sp
 238  238  .ne 2
 239  239  .na
 240  240  \fB\fBebcdic\fR\fR
 241  241  .ad
 242  242  .RS 11n
 243  243  Converts \fBASCII\fR to \fBEBCDIC\fR. If converting fixed-length \fBASCII\fR
 244  244  records without NEWLINEs, sets up a pipeline with \fBdd conv=unblock\fR
 245  245  beforehand.
 246  246  .RE
 247  247  
 248  248  .sp
 249  249  .ne 2
 250  250  .na
 251  251  \fB\fBebcdicb\fR\fR
 252  252  .ad
 253  253  .RS 11n
 254  254  Converts \fBASCII\fR to \fBEBCDIC\fR using \fBBSD\fR-compatible character
 255  255  translations. If converting fixed-length \fBASCII\fR records without
 256  256  \fBNEWLINE\fRs, sets up a pipeline with \fBdd conv=unblock\fR beforehand.
 257  257  .RE
 258  258  
 259  259  .sp
 260  260  .ne 2
 261  261  .na
 262  262  \fB\fBibm\fR\fR
 263  263  .ad
 264  264  .RS 11n
 265  265  Slightly different map of \fBASCII\fR to \fBEBCDIC\fR. If converting
 266  266  fixed-length \fBASCII\fR records without \fBNEWLINE\fRs, sets up a pipeline
 267  267  with \fBdd conv=unblock\fR beforehand.
 268  268  .RE
 269  269  
 270  270  .sp
 271  271  .ne 2
 272  272  .na
 273  273  \fB\fBibmb\fR\fR
 274  274  .ad
 275  275  .RS 11n
 276  276  Slightly different map of \fBASCII\fR to \fBEBCDIC\fR using
 277  277  \fBBSD\fR-compatible character translations. If converting fixed-length
 278  278  \fBASCII\fR records without \fBNEWLINE\fRs, sets up a pipeline with \fBdd
 279  279  conv=unblock\fR beforehand.
 280  280  .RE
 281  281  
 282  282  The \fBascii\fR (or \fBasciib\fR), \fBebcdic\fR (or \fBebcdicb\fR), and
 283  283  \fBibm\fR (or \fBibmb\fR) values are mutually exclusive.
 284  284  .sp
 285  285  .ne 2
 286  286  .na
 287  287  \fB\fBblock\fR\fR
 288  288  .ad
 289  289  .RS 11n
 290  290  Treats the input as a sequence of \fBNEWLINE\fR-terminated or
 291  291  \fBEOF\fR-terminated variable-length records independent of the input block
 292  292  boundaries. Each record is converted to a record with a fixed length specified
 293  293  by the conversion block size. Any \fBNEWLINE\fR character is removed from the
 294  294  input line. \fBSPACE\fR characters are appended to lines that are shorter than
 295  295  their conversion block size to fill the block. Lines that are longer than the
 296  296  conversion block size are truncated to the largest number of characters that
 297  297  will fit into that size. The number of truncated lines is reported.
 298  298  .RE
 299  299  
 300  300  .sp
 301  301  .ne 2
 302  302  .na
 303  303  \fB\fBunblock\fR\fR
 304  304  .ad
 305  305  .RS 11n
 306  306  Converts fixed-length records to variable length. Reads a number of bytes equal
 307  307  to the conversion block size (or the number of bytes remaining in the input, if
 308  308  less than the conversion block size), delete all trailing \fBSPACE\fR
 309  309  characters, and append a \fBNEWLINE\fR character.
 310  310  .RE
 311  311  
 312  312  The  \fBblock\fR and \fBunblock\fR values are mutually exclusive.
 313  313  .sp
 314  314  .ne 2
 315  315  .na
 316  316  \fB\fBlcase\fR\fR
 317  317  .ad
 318  318  .RS 9n
 319  319  Maps upper-case characters specified by the \fBLC_CTYPE\fR keyword
 320  320  \fBtolower\fR to the corresponding lower-case character. Characters for which
 321  321  no mapping is specified are not modified by this conversion.
 322  322  .RE
 323  323  
 324  324  .sp
 325  325  .ne 2
 326  326  .na
 327  327  \fB\fBucase\fR\fR
 328  328  .ad
 329  329  .RS 9n
 330  330  Maps lower-case characters specified by the \fBLC_CTYPE\fR keyword
 331  331  \fBtoupper\fR to the corresponding upper-case character. Characters for which
 332  332  no mapping is specified are not modified by this conversion.
 333  333  .RE
 334  334  
 335  335  The \fBlcase\fR and \fBucase\fR symbols are mutually exclusive.
 336  336  .sp
 337  337  .ne 2
 338  338  .na
 339  339  \fB\fBswab\fR\fR
 340  340  .ad
 341  341  .RS 11n
 342  342  Swaps every pair of input bytes. If the current input record is an odd number
 343  343  of bytes, the last byte in the input record is ignored.
 344  344  .RE
 345  345  
 346  346  .sp
 347  347  .ne 2
 348  348  .na
 349  349  \fB\fBnoerror\fR\fR
 350  350  .ad
 351  351  .RS 11n
 352  352  Does not stop processing on an input error. When an input error occurs, a
 353  353  diagnostic message is written on standard error, followed by the current input
 354  354  and output block counts in the same format as used at completion. If the
 355  355  \fBsync\fR conversion is specified, the missing input is replaced with null
 356  356  bytes and processed normally. Otherwise, the input block will be omitted from
 357  357  the output.
 358  358  .RE
 359  359  
 360  360  .sp
 361  361  .ne 2
 362  362  .na
 363  363  \fB\fBnotrunc\fR\fR
 364  364  .ad
 365  365  .RS 11n
 366  366  Does not truncate the output file. Preserves blocks in the output file not
 367  367  explicitly written by this invocation of \fBdd\fR. (See also the preceding
 368  368  \fBof=\fR\fIfile\fR operand.)
 369  369  .RE
 370  370  
 371  371  .sp
 372  372  .ne 2
 373  373  .na
 374  374  \fB\fBsync\fR\fR
 375  375  .ad
 376  376  .RS 11n
 377  377  Pads every input block to the size of the \fBibs=\fR buffer, appending null
 378  378  bytes. (If either \fBblock\fR or \fBunblock\fR is also specified, appends
 379  379  \fBSPACE\fR characters, rather than null bytes.)
 380  380  .RE
 381  381  
 382  382  .RE
 383  383  
 384  384  .sp
 385  385  .ne 2
 386  386  .na
 387  387  \fB\fBoflag=\fR\fIvalue\fR[\fB,\fR\fIvalue\fR.\|.\|.\|]\fR
 388  388  .ad
 389  389  .sp .6
 390  390  Where \fIvalue\fRs are comma-separated symbols from the following list which
 391  391  affect the behavior of writing the output file:
 392  392  .sp
 393  393  .ne 2
 394  394  .na
 395  395  \fB\fBdsync\fR\fR
 396  396  .ad
 397  397  .RS 11n
 398  398  The output file is opened with the \fBO_DSYNC\fR flag set. All data writes will
 399  399  be synchronous. For more information on \fBO_DSYNC\fR see \fBfcntl.h\fR(3HEAD).
 400  400  .RE
 401  401  
 402  402  .sp
  
    | ↓ open down ↓ | 402 lines elided | ↑ open up ↑ | 
 403  403  .ne 2
 404  404  .na
 405  405  \fB\fBsync\fR\fR
 406  406  .ad
 407  407  .RS 11n
 408  408  The output file is opened with the \fBO_SYNC\fR flag set. All data and metadata
 409  409  writes will be synchronous. For more information on \fBO_SYNC\fR see
 410  410  \fBfcntl.h\fR(3HEAD).
 411  411  .RE
 412  412  
 413      -.RE
 414      -
 415  413  .sp
 416  414  .LP
 417  415  If operands other than \fBconv=\fR and \fBoflag=\fR are specified more than once,
 418  416  the last specified \fBoperand=\fR\fIvalue\fR is used.
 419  417  .sp
 420  418  .LP
 421  419  For the \fBbs=\fR, \fBcbs=\fR, \fBibs=\fR, and \fBobs=\fR operands, the
 422  420  application must supply an expression specifying a size in bytes. The
 423  421  expression, \fBexpr\fR, can be:
 424  422  .RS +4
 425  423  .TP
 426  424  1.
 427  425  a positive decimal number
 428  426  .RE
 429  427  .RS +4
 430  428  .TP
 431  429  2.
 432  430  a positive decimal number followed by \fBk\fR, specifying multiplication by
 433  431  1024
 434  432  .RE
 435  433  .RS +4
 436  434  .TP
 437  435  3.
 438  436  a positive decimal number followed by \fBM\fR, specifying multiplication by
 439  437  1024*1024
 440  438  .RE
 441  439  .RS +4
 442  440  .TP
 443  441  4.
 444  442  a positive decimal number followed by \fBG\fR, specifying multiplication by
 445  443  1024*1024*1024
 446  444  .RE
 447  445  .RS +4
 448  446  .TP
 449  447  5.
 450  448  a positive decimal number followed by \fBT\fR, specifying multiplication by
 451  449  1024*1024*1024*1024
 452  450  .RE
 453  451  .RS +4
 454  452  .TP
 455  453  6.
 456  454  a positive decimal number followed by \fBP\fR, specifying multiplication by
 457  455  1024*1024*1024*1024*1024
 458  456  .RE
 459  457  .RS +4
 460  458  .TP
 461  459  7.
 462  460  a positive decimal number followed by \fBE\fR, specifying multiplication by
 463  461  1024*1024*1024*1024*1024*1024
 464  462  .RE
 465  463  .RS +4
 466  464  .TP
 467  465  8.
 468  466  a positive decimal number followed by \fBZ\fR, specifying multiplication by
 469  467  1024*1024*1024*1024*1024*1024*1024
 470  468  .RE
 471  469  .RS +4
 472  470  .TP
 473  471  9.
 474  472  a positive decimal number followed by \fBb\fR, specifying multiplication by
 475  473  512
 476  474  .RE
 477  475  .RS +4
 478  476  .TP
 479  477  10.
 480  478  two or more positive decimal numbers (with or without \fBk\fR or \fBb\fR)
 481  479  separated by \fBx\fR, specifying the product of the indicated values.
 482  480  .RE
 483  481  .sp
 484  482  .LP
 485  483  All of the operands will be processed before any input is read.
 486  484  .SH SIGNALS
 487  485  .sp
 488  486  .LP
 489  487  When \fBdd\fR receives either SIGINFO or SIGUSR1, \fBdd\fR will emit the current
 490  488  input and output block counts, total bytes written, total time elapsed, and the
 491  489  number of bytes per second to standard error. This is the same information
 492  490  format that \fBdd\fR emits when it successfully completes. Users may send
 493  491  SIGINFO via their terminal. The default character is ^T, see \fBstty\fR(1) for
 494  492  more information.
 495  493  .sp
 496  494  .LP
 497  495  For \fBSIGINT\fR, \fBdd\fR writes status information to standard error before
 498  496  exiting. \fBdd\fR takes the standard action for all other signals.
 499  497  
 500  498  .SH USAGE
 501  499  .sp
 502  500  .LP
 503  501  See \fBlargefile\fR(5) for the description of the behavior of \fBdd\fR when
 504  502  encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
 505  503  .SH EXAMPLES
 506  504  .LP
 507  505  \fBExample 1 \fRCopying from one tape drive to another
 508  506  .sp
 509  507  .LP
 510  508  The following example copies from tape drive \fB0\fR to tape drive \fB1\fR,
 511  509  using a common historical device naming convention.
 512  510  
 513  511  .sp
 514  512  .in +2
 515  513  .nf
 516  514  example% \fBdd if=/dev/rmt/0h  of=/dev/rmt/1h\fR
 517  515  .fi
 518  516  .in -2
 519  517  .sp
 520  518  
 521  519  .LP
 522  520  \fBExample 2 \fRStripping the first 10 bytes from standard input
 523  521  .sp
 524  522  .LP
 525  523  The following example strips the first 10 bytes from standard input:
 526  524  
 527  525  .sp
 528  526  .in +2
 529  527  .nf
 530  528  example% \fBdd ibs=10  skip=1\fR
 531  529  .fi
 532  530  .in -2
 533  531  .sp
 534  532  
 535  533  .LP
 536  534  \fBExample 3 \fRReading a tape into an ASCII file
 537  535  .sp
 538  536  .LP
 539  537  This example reads an \fBEBCDIC\fR tape blocked ten 80-byte \fBEBCDIC\fR card
 540  538  images per block into the \fBASCII\fR file \fBx\fR:
 541  539  
 542  540  .sp
 543  541  .in +2
 544  542  .nf
 545  543  example% \fBdd if=/dev/tape of=x ibs=800 cbs=80 conv=ascii,lcase\fR
 546  544  .fi
 547  545  .in -2
 548  546  .sp
 549  547  
 550  548  .LP
 551  549  \fBExample 4 \fRUsing conv=sync to write to tape
 552  550  .sp
 553  551  .LP
 554  552  The following example uses \fBconv=sync\fR when writing to a tape:
 555  553  
 556  554  .sp
 557  555  .in +2
 558  556  .nf
 559  557  example% \fBtar cvf - . | compress | dd obs=1024k of=/dev/rmt/0 conv=sync\fR
 560  558  .fi
 561  559  .in -2
 562  560  .sp
 563  561  
 564  562  .SH ENVIRONMENT VARIABLES
 565  563  .sp
 566  564  .LP
 567  565  See \fBenviron\fR(5) for descriptions of the following environment variables
 568  566  that affect the execution of \fBdd\fR: \fBLANG\fR, \fBLC_ALL\fR,
 569  567  \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
 570  568  .SH EXIT STATUS
 571  569  .sp
 572  570  .LP
 573  571  The following exit values are returned:
 574  572  .sp
 575  573  .ne 2
 576  574  .na
 577  575  \fB\fB0\fR\fR
 578  576  .ad
 579  577  .RS 6n
 580  578  The input file was copied successfully.
 581  579  .RE
 582  580  
 583  581  .sp
 584  582  .ne 2
 585  583  .na
 586  584  \fB\fB>0\fR\fR
 587  585  .ad
 588  586  .RS 6n
 589  587  An error occurred.
 590  588  .RE
 591  589  
 592  590  .sp
 593  591  .LP
 594  592  If an input error is detected and the \fBnoerror\fR conversion has not been
 595  593  specified, any partial output block will be written to the output file, a
 596  594  diagnostic message will be written, and the copy operation will be
 597  595  discontinued. If some other error is detected, a diagnostic message will be
 598  596  written and the copy operation will be discontinued.
 599  597  .SH ATTRIBUTES
 600  598  .sp
 601  599  .LP
 602  600  See \fBattributes\fR(5) for descriptions of the following attributes:
 603  601  .sp
 604  602  
 605  603  .sp
 606  604  .TS
 607  605  box;
 608  606  c | c
 609  607  l | l .
 610  608  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 611  609  _
 612  610  Interface Stability     Standard
 613  611  .TE
 614  612  
 615  613  .SH SEE ALSO
 616  614  .sp
 617  615  .LP
 618  616  \fBcp\fR(1), \fBsed\fR(1), \fBtr\fR(1), \fBfcntl.h\fR(3HEAD),
 619  617  \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
 620  618  .SH DIAGNOSTICS
 621  619  .sp
 622  620  .ne 2
 623  621  .na
 624  622  \fB\fBf+p records in(out)\fR\fR
 625  623  .ad
 626  624  .RS 23n
 627  625  numbers of full and partial blocks read(written)
 628  626  .RE
 629  627  
 630  628  .SH NOTES
 631  629  .sp
 632  630  .LP
 633  631  Do not use \fBdd\fR to copy files between file systems having different block
 634  632  sizes.
 635  633  .sp
 636  634  .LP
 637  635  Using a  blocked device to copy a file will result in extra nulls being added
 638  636  to the file to pad the final block to the block boundary.
 639  637  .sp
 640  638  .LP
 641  639  When  \fBdd\fR reads from a pipe, using the  \fBibs=X\fR and  \fBobs=Y\fR
 642  640  operands, the output will always be blocked in chunks of size Y. When
 643  641  \fBbs=Z\fR is used, the output blocks will be whatever was available to be read
 644  642  from the pipe at the time.
 645  643  .sp
 646  644  .LP
 647  645  When using \fBdd\fR to copy files to a tape device, the file size must be a
 648  646  multiple of the device sector size (for example, 512 Kbyte).  To  copy files of
 649  647  arbitrary size to a tape device, use  \fBtar\fR(1) or  \fBcpio\fR(1).
  
    | ↓ open down ↓ | 225 lines elided | ↑ open up ↑ | 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX