dd.1 - sbase - suckless unix tools
 (HTM) git clone git://git.suckless.org/sbase
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       dd.1 (1983B)
       ---
            1 .Dd April 28, 2020
            2 .Dt DD 1
            3 .Os sbase
            4 .Sh NAME
            5 .Nm dd
            6 .Nd convert and copy a file
            7 .Sh SYNOPSIS
            8 .Nm
            9 .Op Ar operand Ns ...
           10 .Sh DESCRIPTION
           11 .Nm
           12 copies its input to its output, possibly after conversion, using
           13 the specified block sizes,
           14 .Pp
           15 The following operands are available:
           16 .Bl -tag -width ibs=expr
           17 .It Cm if= Ns Ar file
           18 Read from the file named by
           19 .Ar file
           20 instead of standard input.
           21 .It Cm of= Ns Ar file
           22 Write to the file named by
           23 .Ar file
           24 instead of standard output.
           25 .It Cm ibs= Ns Ar expr
           26 Set the input block size to
           27 .Ar expr
           28 (defaults to 512).
           29 .It Cm obs= Ns Ar expr
           30 Set the output block size to
           31 .Ar expr
           32 (defaults to 512).
           33 .It Cm bs= Ns Ar expr
           34 Set the input and output block sizes to
           35 .Ar expr .
           36 Additionally, if no conversion other than
           37 .Cm noerror ,
           38 .Cm notrunc ,
           39 or
           40 .Cm sync
           41 is specified, input blocks are copied as single output blocks, even
           42 when the input block is short.
           43 .It Cm skip= Ns Ar n
           44 Skip
           45 .Ar n
           46 input blocks before starting to copy.
           47 .It Cm seek= Ns Ar n
           48 Skip
           49 .Ar n
           50 output blocks before starting to copy.
           51 .It Cm count= Ns Ar n
           52 Copy at most
           53 .Ar n
           54 input blocks.
           55 .It Cm conv= Ns Ar value Ns Op , Ns Ar value Ns ...
           56 Apply the conversions specified by
           57 .Ar value .
           58 .Bl -tag -width Ds
           59 .It Cm lcase
           60 Map uppercase characters to the corresponding lowercase character
           61 using
           62 .Fn tolower .
           63 .It Cm ucase
           64 Map lowercase characters to the corresponding uppercase character
           65 using
           66 .Fn toupper .
           67 .It Cm swab
           68 Swap each pair of bytes in the input block.
           69 If there is an odd number of bytes in a block, the last one is
           70 unmodified.
           71 .It Cm noerror
           72 In case of an error reading from the input, do not fail.
           73 Instead, print a diagnostic message and a summary of the current
           74 status.
           75 .It Cm notrunc
           76 Do not truncate the output file.
           77 .It Cm sync
           78 In case of a partial input block, pad with null bytes to form a
           79 complete block.
           80 .El
           81 .El
           82 .Sh STANDARDS
           83 The
           84 .Nm
           85 utility is compliant with the
           86 .St -p1003.1-2008
           87 specification, except that it does not implement the
           88 .Cm block
           89 and
           90 .Cm unblock
           91 conversions.