dd Befehl zurück
Punkt 1 Beispiele Fragen Experten Links Orginaltexte
Allgemeine Beschreibung
dd überträgt Daten zwischen verschiedenen Speichermedien ( Festplatte , Diskette ) und führt dabei auf Wunsch eine Kovertierung der Daten durch.
Hilfe zu dd
dd --help
man dd
info dd
Im Web unter
http://www.linux-ag.com/linux/LHB/node40.html#SECTION004180000000000000000
Übersicht
dd (disk dump) konvertiert Dateien für verschiedene Speichermedien.
Das Kommando dd kann zb dazu benutzt werden , Daten zwischen verschiedenen Rechnerarchitekturen auszutauschen.
Außerdem ist mit dem Befehl ein Hexdump möglich. ( entsprechend dem Dos Befehl Debug )
dd kann nicht nur einzelne Dateien kopieren , sondern auch auch direkt auf Devices zugreifen.
Damit können ganze Festplatten (partitionen ) kopiert oder der Bootsektor der Festplatte verändert werden.
Auf der Festplatte oder Diskette muß kein Dateisystem eingerichtet werden.
Wenn dd ohne Optionen verwendet wird , liest es die Daten aus der Standardeingabe ( Tastatur , Ende mit Strg + Z) und schreibt in die Standardausgabe ( auf den Bildschirm )
Ausprobieren ! Auch Steuerzeichen werden dann als Textzeichen ausgegeben .
Ausnahme : Return , Backspace , Tabtaste
Syntax:
dd [if=Datei] [of=Datei] [ibs=Bytes] [obs=Bytes] [bs=Bytes] [cbs=Bytes] [skip=Blöcke] [seek=Blöcke][count=Blöcke] [conv={ascii, ebcdic, ibm, block, unblock, lcase, ucase, swab, noerror, notrunc, sync}]
Beschreibung:
dd liest eine Datei und schreibt den Inhalt mit wählbarer Blockgröße und verschiedenen Konvertierungen. Mit Hilfe dieses Kommandos können reguläre Dateien ebenso wie ganze Disketten oder Festplattenpartitionen kopiert werden.
Optionen:
if=Datei
(input file) der Name der Eingabedatei (voreingestellt ist die Standardeingabe)
of=Datei
(output file) der Name der Ausgabedatei (voreingestellt ist die Standardausgabe)
ibs=Schritt
(input block size) Blockgröße der Eingabedatei
obs=Schritt
(output block size) Blockgröße der Ausgabedatei
bs=Schritt
(block size) Blockgröße für Ein- und Ausgabedatei
cbs=Schritt
(conversion block size) Blockgröße für Konvertierung
skip=Blocks
ignoriert am Anfang die angegebene Anzahl Blocks von der Eingabe
seek=Blocks
unterdrückt am Anfang die Ausgabe der angegebenen Anzahl Blocks
count=Blocks
kopiert die angegebene Anzahl Blocks
conv=Konvertierung ...
bestimmt die Art der Konvertierung; Konvertierung ist dabei eine von:
ascii
konvertiert EBCDIC nach ASCII
ebcdic
konvertiert ASCII nach EBCDIC
ibm
konvertiert ASCII nach big blue special EBCDIC
block
schreibt Zeilen in Felder der Größe cbs und ersetzt das Zeilenende durch Leerzeichen; der Rest des Feldes wird ebenfalls mit Leerzeichen aufgefüllt
unblock
ersetzt abschließende Leerzeichen eines Blocks der Größe -cbs durch ein Zeilenende
lcase
wandelt Großbuchstaben in Kleinbuchstaben
ucase
wandelt Kleinbuchstaben in Großbuchstaben
swab
vertauscht je zwei Bytes der Eingabe; wenn die Anzahl der gelesenen Bytes ungerade ist, wird das letzte Byte einfach kopiert
noerror
ignoriert Lesefehler
sync
füllt Eingabeblöcke bis zur Größe von ibs mit Nullen
conv=modus
kovertiert die Daten während des Kopierens . Für modus sind verschiedene Einstellungen erlaubt.
lcase verwandelt Großbuchstaben in Kleinbuchstaben
ucase verwandelt Kleinbuchstaben in Großbuchstaben
swab vertauscht jeweils 2 Bytes
bs=n
bestimmt die Blockgröße für die Ein - und Ausgabedatei
(Die Blockgröße gibt an , wie viele Bytes in einem Durchgang gelesen bzw geschrieben werden.
count=n
kopiert nur n Blöcke ( und nicht die gesamten daten )
ibs=n
bestimmt die Blockgröße der Quelldatei
if=quelldatei
gibt die Quelldatei ( statt der Standardeingabe ) an
obs=n
bestimmt die Blockgröße der Zieldatei
of=zieldatei
Gibt die Zieldatei statt der Standarausgabe an
dd if=/dev/hda bs=512 count=1
Gibt den Bootsektor auf dem Bildschirm aus
dd if=/dev/hda of=/boot/bootsektor.bak bs=512 count=1
Dieser Befehl überträgt den Bootsektor der ersten IDE-Festplatte in die Datei bootsektor.bak
Diesen Befehl akzeptiert das Betriebssystem nur vom root User
dd if=/vmlinuz of=/dev/fd0
Dieser Befehl kopiert den Kernel direkt in die ersten Sektoren der Diskette . Dies kann dann als Bootdiskette verwendet werden.
http://www.linux-ag.com/linux/LHB/node40.html#SECTION004180000000000000000
dd --help
Benutzung: dd [OPTION]...
Copy a file, converting and formatting according to the options.
bs=BYTES force ibs=BYTES and obs=BYTES
cbs=BYTES convert BYTES bytes at a time
conv=KEYWORDS convert the file as per the comma separated keyword list
count=BLOCKS copy only BLOCKS input blocks
ibs=BYTES read BYTES bytes at a time
if=FILE read from FILE instead of stdin
obs=BYTES write BYTES bytes at a time
of=FILE write to FILE instead of stdout
seek=BLOCKS skip BLOCKS obs-sized blocks at start of output
skip=BLOCKS skip BLOCKS ibs-sized blocks at start of input
--help display this help and exit
--version output version information and exit
BLOCKS and BYTES may be followed by the following multiplicative suffixes:
xM M, c 1, w 2, b 512, kD 1000, k 1024, MD 1,000,000, M 1,048,576,
GD 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y.
Each KEYWORD may be:
ascii from EBCDIC to ASCII
ebcdic from ASCII to EBCDIC
ibm from ASCII to alternated EBCDIC
block pad newline-terminated records with spaces to cbs-size
unblock replace trailing spaces in cbs-size records with newline
lcase change upper case to lower case
notrunc do not truncate the output file
ucase change lower case to upper case
swab swap every pair of input bytes
noerror continue after read errors
sync pad every input block with NULs to ibs-size; when used with block or unblock, pad with spaces rat her than NULs
Berichten Sie Fehler an <bug-fileutils@gnu.org>.
man dd
NAME
dd - convert and copy a file
SYNOPSIS
dd [OPTION]...
DESCRIPTION
Copy a file, converting and formatting
according to the options.
bs=BYTES
force ibs=BYTES and obs=BYTES
cbs=BYTES
convert BYTES bytes at a time
conv=KEYWORDS
convert the file as per the comma
separated keyword list
count=BLOCKS
copy only BLOCKS input blocks
ibs=BYTES
read BYTES bytes at a time
if=FILE
read from FILE instead of stdin
obs=BYTES
write BYTES bytes at a time
of=FILE
write to FILE instead of stdout
seek=BLOCKS
skip BLOCKS obs-sized blocks at start of output
skip=BLOCKS
skip BLOCKS ibs-sized blocks at start of input
--help display this help and exit
--version
output version information and exit
BLOCKS and BYTES may be followed by the following multiplicative suffixes: xM M, c 1, w 2, b
512, kD 1000, k 1024, MD 1,000,000, M 1,048,576, GD 1,000,000,000, G 1,073,741,824, and so on
for T, P, E, Z, Y. Each KEYWORD may be:
ascii from EBCDIC to ASCII
ebcdic from ASCII to EBCDIC
ibm from ASCII to alternated EBCDIC
block pad newline-terminated records with spaces to cbs-size
unblock
replace trailing spaces in cbs-size records with newline
lcase change upper case to lower case
notrunc
do not truncate the output file
ucase change lower case to upper case
swab swap every pair of input bytes
noerror
continue after read errors
sync pad every input block with NULs to ibs-size; when used
with block or unblock, pad with spaces rather than NULs
AUTHOR
Written by Paul Rubin, David MacKenzie, and Stuart Kemp.
REPORTING BUGS
Report bugs to <bug-fileutils@gnu.org>.
COPYRIGHT
Copyright © 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even
for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
The full documentation for dd is maintained as a Texinfo manual. If the info and dd programs
are properly installed at your site, the command
info dd
should give you access to the complete manual.
dd (fileutils) 4.1 April 2001 DD(1)
email
ReinerHoffmannKC@t-online.de