dd(1p)

Från Wiki.linux.se
Version från den 14 februari 2025 kl. 15.34 av Admin (diskussion | bidrag) (Skapade sidan med ''''dd(1p) - Linux manual page''' == PROLOG == This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. == NAME == dd — convert and copy a file == SYNOPSIS == <code>dd [operand...]</code> == DESCRIPTION == The <code>dd</code> utility shall copy the specified input file to the specified...')
(skillnad) ← Äldre version | Nuvarande version (skillnad) | Nyare version → (skillnad)
Hoppa till navigering Hoppa till sök

dd(1p) - Linux manual page

PROLOG

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.

NAME

dd — convert and copy a file

SYNOPSIS

dd [operand...]

DESCRIPTION

The dd utility shall copy the specified input file to the specified output file with possible conversions using specific input and output block sizes. It reads input one block at a time, applies specified conversions, and writes output accordingly.

Processing Steps

  1. An input block is read.
  2. If the input block is shorter than the specified input block size and sync conversion is specified, null bytes shall be appended.
  3. If bs=expr is specified and no conversion other than sync or noerror is requested, the data is written as a single block.
  4. If swab is specified, pairs of input bytes shall be swapped.
  5. Other conversions (block, unblock, lcase, ucase) are performed.
  6. Data is aggregated into output blocks of the specified size.

OPTIONS

None.

OPERANDS

  • if=file - Specify input file (default: standard input).
  • of=file - Specify output file (default: standard output).
  • ibs=expr - Set input block size (default: 512 bytes).
  • obs=expr - Set output block size (default: 512 bytes).
  • bs=expr - Set both input and output block size.
  • skip=n - Skip n input blocks.
  • seek=n - Skip n output blocks.
  • count=n - Copy only n input blocks.
  • conv=value - Apply conversions like ascii, ebcdic, lcase, ucase, swab, etc.

EXIT STATUS

  • 0 - Success.
  • >0 - An error occurred.

EXAMPLES

Copy from tape drive 0 to tape drive 1: dd if=/dev/rmt0h of=/dev/rmt1h

Strip the first 10 bytes from input: dd ibs=10 skip=1

Convert an EBCDIC tape to ASCII: dd if=/dev/tape of=x ibs=800 cbs=80 conv=ascii,lcase

SEE ALSO

COPYRIGHT

Portions of this text are reprinted from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX). The official standard can be found at The Open Group.

Sidslut

Orginalhemsidan på Engelska :https://man7.org/linux/man-pages/man1/dd.1p.html


Det här är en maskinöversättning av Linux man sidor till svenska. Om du hittar fel är vi tacksamma om du rapporterar dem via formuläret som finns på https://www.linux.se/kontaka-linux-se/

Tack till PC-Service som har sponsrat Linux.se med webbhotell.