Module dd_lib::opts

source ·
Expand description

Configuration and parsing.

  • bs=n. Set both input and output block size to n bytes, superseding the ibs and obs operands. If no conversion values other than noerror, notrunc or sync are specified, then each input block is copied to the output as a single block without any aggregation of short blocks.

  • cbs=n Set the conversion record size to n bytes. The conversion record size is required by the record oriented conversion values.

  • conv=value[,value …] Set conversion flags according to the comma-separated symbol lsit. See [flags/cflag]

  • files=n: Copy n input files before terminating. This operand is only applicable when the input device is a tape.

  • ibs=n: Set the input block size to n bytes instead of the default 512.

  • if=file: Read input from file instead of the standard input.

  • iflags=value[,value …] [opts::IFlag] Set input flags according to the comma-separated symbol list. See [flags/iflag]

  • iseek=n: Seek on the input file n blocks. This is synonymous with skip=n.

  • obs=n: Set the output block size to n bytes instead of the default 512.

  • of=file Write output to file instead of the standard output. Any regular output file is truncated unless the notrunc conversion value is specified. If an initial portion of the output file is seeked past (see the oseek operand), the output file is truncated at that point. - oseek=n Seek on the output file n blocks. This is synonymous with seek=n.

  • oflags=value[,value …]: [flags::Out] Set output flags according to the comma-separated symbol list. See [flags/oflag]

  • seek=n Seek n blocks from the beginning of the output before copying. On non-tape devices, an lseek(2) operation is used. Otherwise, existing blocks are read and the data discarded. If the user does not have read permission for the tape, it is positioned using the tape 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.

  • skip=n Skip n blocks from the beginning of the input before copying. If the input doesn’t support seeks (i.e, is Stdin) Otherwise, input data is read and discarded. For pipes, the correct number of bytes is read. For all other devices, the correct number of blocks is read without distinguishing between a partial or complete block being read. error types and handling for command line options

  • status=LEVEL The LEVEL of information to print to stderr

    • none suppresses everything but error messages
    • noxfer suppresses the final transfer statistics,
    • progress shows periodic transfer statistics

Structs

Each CONV symbol may be:
Input (read) flags, specified by the iflag option
Output (write) flags, specified by the oflag option
conversion of strings to unsized integers & unit conversions input, output, and conversion flags Conversion flags, specified by the conv option The parsed and handled user options.

Enums

errors dealing with handling user options An error dealing with an option
Enumeration of the four kinds of command line options: BasicOptions, conversion flags, input flags, output flags
The Mode that DD runs in.
The LEVEL of information to print to stderr

Functions

split a string of the form {key}={val} into a two-tuple, if possible. if it would be larger than a two-tuple, returns None
Parse a numeric string with an optional one-or-two character multiplicative suffix (K, KB, M, MB, …) into an integer. Numeric strings may be decimal, octal, or hexadecimal. Multiple numeric strings may be multipled together by separating them with the ‘X’ character. See [units] for a list of the SI suffixes.

Type Definitions

errors dealing with handling user options