Usage: dd [OPERAND]...
or: dd OPTION
Copy a file, converting and formatting according to the operands.
bs=BYTES read and write BYTES bytes at a time (also see ibs=,obs=)
cbs=BYTES convert BYTES bytes at a time
conv=CONVS convert the file as per the comma separated symbol list
count=N copy only N input blocks
ibs=BYTES read BYTES bytes at a time (default: 512)
if=FILE read from FILE instead of stdin
iflag=FLAGS read as per the comma separated symbol list
obs=BYTES write BYTES bytes at a time (default: 512)
of=FILE write to FILE instead of stdout
oflag=FLAGS write as per the comma separated symbol list
seek=BLOCKS skip BLOCKS obs-sized blocks at start of output
skip=BLOCKS skip BLOCKS ibs-sized blocks at start of input
status=WHICH WHICH info to suppress outputting to stderr;
'noxfer' suppresses transfer stats, 'none' suppresses all
BLOCKS and BYTES may be followed by the following multiplicative suffixes:
c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M
GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.
Each CONV symbol may be:
ascii from EBCDIC to ASCII
ebcdic from ASCII to EBCDIC
ibm from ASCII to alternate 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
nocreat do not create the output file
excl fail if the output file already exists
notrunc do not truncate the output file
ucase change lower case to upper case
sparse try to seek rather than write the output for NUL input blocks
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
fdatasync physically write output file data before finishing
fsync likewise, but also write metadata
Each FLAG symbol may be:
append append mode (makes sense only for output; conv=notrunc suggested)
direct use direct I/O for data
directory fail unless a directory
dsync use synchronized I/O for data
sync likewise, but also for metadata
fullblock accumulate full blocks of input (iflag only)
nonblock use non-blocking I/O
noatime do not update access time
noctty do not assign controlling terminal from file
nofollow do not follow symlinks
count_bytes treat 'count=N' as a byte count (iflag only)
Sending a USR1 signal to a running `dd' process makes it
print I/O statistics to standard error and then resume copying.
$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid
18335302+0 records in
18335302+0 records out
9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s
Options are:
--help この使い方を表示して終了
--version バージョン情報を表示して終了
Report dd bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: dd [OPERAND]...
or: dd OPTION
Copy a file, converting and formatting according to the operands.
bs=BYTES read and write BYTES bytes at a time (also see ibs=,obs=)
cbs=BYTES convert BYTES bytes at a time
conv=CONVS convert the file as per the comma separated symbol list
count=N copy only N input blocks
ibs=BYTES read BYTES bytes at a time (default: 512)
if=FILE read from FILE instead of stdin
iflag=FLAGS read as per the comma separated symbol list
obs=BYTES write BYTES bytes at a time (default: 512)
of=FILE write to FILE instead of stdout
oflag=FLAGS write as per the comma separated symbol list
seek=BLOCKS skip BLOCKS obs-sized blocks at start of output
skip=BLOCKS skip BLOCKS ibs-sized blocks at start of input
status=WHICH WHICH info to suppress outputting to stderr;
'noxfer' suppresses transfer stats, 'none' suppresses all
BLOCKS and BYTES may be followed by the following multiplicative suffixes:
c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M
GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.
Each CONV symbol may be:
ascii from EBCDIC to ASCII
ebcdic from ASCII to EBCDIC
ibm from ASCII to alternate 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
nocreat do not create the output file
excl fail if the output file already exists
notrunc do not truncate the output file
ucase change lower case to upper case
sparse try to seek rather than write the output for NUL input blocks
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
fdatasync physically write output file data before finishing
fsync likewise, but also write metadata
Each FLAG symbol may be:
append append mode (makes sense only for output; conv=notrunc suggested)
direct use direct I/O for data
directory fail unless a directory
dsync use synchronized I/O for data
sync likewise, but also for metadata
fullblock accumulate full blocks of input (iflag only)
nonblock use non-blocking I/O
noatime do not update access time
noctty do not assign controlling terminal from file
nofollow do not follow symlinks
count_bytes treat 'count=N' as a byte count (iflag only)
Sending a USR1 signal to a running `dd' process makes it
print I/O statistics to standard error and then resume copying.
$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid
18335302+0 records in
18335302+0 records out
9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s
Options are:
--help display this help and exit
--version output version information and exit
Report dd bugs to bug-coreutils@gnu.org
GNU coreutils home page:
DD(1) DD(1) 名前 dd - ファイルを変換してコピーする 書式 dd [--help] [--version] [if=file] [of=file] [ibs=bytes] [obs=bytes] [bs=bytes] [cbs=bytes] [skip=blocks] [seek=blocks] [count=blocks] [conv={ascii, ebcdic, ibm, block, unblock, lcase, ucase, swab, noerror, notrunc, sync}] 説明 dd はファイルを指定された入出力ブロックサイズで (デフォルトでは標準入力 から標準出力へ) コピーする。入出力の間に変換を指定することもできる。 dd は指定された入力ブロックサイズ (デフォルトは 512 バイト) で、一度に 1 ブロックを読み込む。 bs=bytes オプションが指定され て い て 、 sync, noerror, notrunc 以外の変換が指定されていない場合、読み込んだ全データ ( 要求されたサイズより小さくてもよい) を出力ブロックに書き出す。この出 力 ブ ロックは sync 変換が指定されていない限り、読み込まれたものと正確に同 じ長さを持っている。 sync が指定された場合は、データは NUL またはスペー スで埋められる (下記参照)。 それ以外の場合、入力は一度に 1 ブロックずつ読み込まれて処理され、その結 果は出力ブロックサイズに指定された大きさごとに書き出される。最後の出 力 ブロックは短くなることがある。 下 記の (バイトまたはブロック) といった数値オプションの後ろには、乗数の 項目で挙げる乗数を続けて置くことができる。 x を間に挟んで、このような数 値表記を 2 つ以上掛けあわせることもできる。 オプション if=file 標準入力の代わりに、ファイル file から読み込む。 of=file 標準出力の代わりに、ファイル file へ書き出す。 conv=notrunc が与 えられない限り、 dd はファイル file を (訳注: コピー前に) 0 バイ ト (もしくは seek= で指定されたサイズ) に切り詰める。 ibs=bytes 一度に bytes バイトずつ読み込む。デフォルトは 512。 obs=bytes 一度に bytes バイトずつ書き出す。デフォルトは 512。 bs=bytes 一 度に bytes バイトずつ読み込みと書き出しをする。 ibs と obs よ り優先される。 (少なくとも sync, noerror, notrunc 以外の変換が指 定されていない場合には、 bs の指定は ibs と obs の両方をこれと同 じ値に設定することと等価ではない。なぜなら bs では、各入力ブロッ クが単一の出力ブロックにコピーされる、すなわち短い複数の入力ブロ ックをまとめない、ということが規定されているからである。) cbs=bytes block と unblock の変換ブロックサイズを指定する。 skip=blocks ibs バイトのブロック blocks 個分だけ入力ファイルの先頭をスキップ する。 seek=blocks 出 力の先頭にある obs バイトのブロック blocks 個分を書き出さない 。 count=blocks 入力ファイルの終りまで全てではなく、 ibs バイトのブロック blocks 個分だけ入力ファイルをコピーする。 conv=CONVERSION[,CONVERSION]... 引 き数 CONVERSION で指定されたファイル変換を行う。(コンマの前後 にスペースを置かない。) 変換: ascii EBCDIC から ASCII に変換する。 ebcdic ASCII から EBCDIC に変換する。 ibm ASCII から別の (IBM の) EBCDIC に変換する。 block 入力された各行につき、 cbs バイトずつを出力する。改行文字 は 空白文字で置き換え、必要であれば複数の空白文字を詰める 。 unblock 入力された cbs バイトのブロックそれぞれにおいて、末尾の連 続した複数の空白文字を一つの改行文字に変換する。 lcase 大文字を小文字に変換する。 ucase 小文字を大文字に変換する。 swab 入力バイトの全ての (訳註:2バイトずつの) ペアを入れ換える 。 GNU dd は他と違い、奇数個のバイトを読み込んだ場合に も 動 作する。奇数個の場合、最後のバイトは (入れ換えるバイト がないので) 単純にコピーされる。 noerror 読み込みエラーが発生しても継続する。 notrunc 出力ファイルを切り詰めない。 (訳注: 書き込み前の切り詰 め を 行わず、そのまま先頭バイトから書き込みを行います。入力 ファイルと出力ファイルが同じ場合にファイルが壊れません。) sync block または unblock が指定されていなければ、各入力ブロッ クに対して、大きさが ibs になるまで連続して NUL (バ イ ト 0) を詰める。指定されている場合はスペースで詰める。 GNU 標準オプション --help 標準出力に使用方法のメッセージを出力して正常終了する。 --version 標準出力にバージョン情報を出力して正常終了する。 -- オプションリストの終りを示す。 乗数 数 値の後には、倍数を指定するサイズ指定文字と、通常のバイトを意味する B または 10 進の「商業用」バイトを意味する D を続けて置くことができる。た とえば ‘1KB’ は ‘1024’ と等しく、‘1KD’ は ‘1000’ と等しい。この例外は b (512 バイト)、c (1 バイト)、 w (使うべきでない - System V では 2 を意味 し 、 4.2BSD では 4 を意味する) の 3 つで、これらの後に B や D をおくこ とはできない。 k キロ: 通常バイト指定なら 2^10 = 1024、10 進バイト指定なら 10^3 = 1000 M メガ: 2^20 = 1,048,576 または 10^6 = 1,000,000 G ギガ: 2^30 = 1,073,741,824 または 10^9 = 1,000,000,000 T テラ: 2^40 = 1,099,511,627,776 または 10^12 = 1,000,000,000,000 P ペ タ: 2^50 = 1,125,899,906,842,624 ま た は 10^15 = 1,000,000,000,000,000 E エクサ: 2^60 = 1,152,921,504,606,846,976 ま た は 10^18 = 1,000,000,000,000,000,000 Z ゼ タ: 2^70 = 1,180,591,620,717,411,303,424 または 10^21 = 1,000,000,000,000,000,000,000 Y ヨタ: 2^80 = 1,208,925,819,614,629,174,706,176 また は 10^24 = 1,000,000,000,000,000,000,000,000 環境変数 変数 LANG, LC_ALL, LC_CTYPE, LC_MESSAGES が通常の意味を持つ。 準拠 POSIX 1003.2 注意 このページは fileutils-4.1 パッケージの dd コマンドについて説明したもの である; その他のバージョンでは少し違いがあるかもしれない。修正や追加 は aeb@cwi.nl, aw@mail1.bet1.puv.fi, ragnar@ragnar-hojland.com 宛にメール で連絡してください。プログラムのバグについては bug-fileutils@gnu.org へ 報告してください。 GNU fileutils 4.1 18 June 2002 DD(1)
DD(1) User Commands DD(1)
NAME
dd - convert and copy a file
SYNOPSIS
dd [OPERAND]...
dd OPTION
DESCRIPTION
Copy a file, converting and formatting according to the operands.
bs=BYTES
read and write BYTES bytes at a time (also see ibs=,obs=)
cbs=BYTES
convert BYTES bytes at a time
conv=CONVS
convert the file as per the comma separated symbol list
count=N
copy only N input blocks
ibs=BYTES
read BYTES bytes at a time (default: 512)
if=FILE
read from FILE instead of stdin
iflag=FLAGS
read as per the comma separated symbol list
obs=BYTES
write BYTES bytes at a time (default: 512)
of=FILE
write to FILE instead of stdout
oflag=FLAGS
write as per the comma separated symbol list
seek=BLOCKS
skip BLOCKS obs-sized blocks at start of output
skip=BLOCKS
skip BLOCKS ibs-sized blocks at start of input
status=WHICH
WHICH info to suppress outputting to stderr; ’noxfer’ suppresses
transfer stats, ’none’ suppresses all
BLOCKS and BYTES may be followed by the following multiplicative suf-
fixes: c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M
=1024*1024, xM =M GB =1000*1000*1000, G =1024*1024*1024, and so on for
T, P, E, Z, Y.
Each CONV symbol may be:
ascii from EBCDIC to ASCII
ebcdic from ASCII to EBCDIC
ibm from ASCII to alternate 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
nocreat
do not create the output file
excl fail if the output file already exists
notrunc
do not truncate the output file
ucase change lower case to upper case
sparse try to seek rather than write the output for NUL input blocks
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
fdatasync
physically write output file data before finishing
fsync likewise, but also write metadata
Each FLAG symbol may be:
append append mode (makes sense only for output; conv=notrunc sug-
gested)
direct use direct I/O for data
directory
fail unless a directory
dsync use synchronized I/O for data
sync likewise, but also for metadata
fullblock
accumulate full blocks of input (iflag only)
nonblock
use non-blocking I/O
noatime
do not update access time
noctty do not assign controlling terminal from file
nofollow
do not follow symlinks
count_bytes
treat ’count=N’ as a byte count (iflag only)
Sending a USR1 signal to a running ‘dd’ process makes it print I/O
statistics to standard error and then resume copying.
$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid
18335302+0 records in 18335302+0 records out 9387674624 bytes
(9.4 GB) copied, 34.6279 seconds, 271 MB/s
Options are:
--help display this help and exit
--version
output version information and exit
AUTHOR
Written by Paul Rubin, David MacKenzie, and Stuart Kemp.
REPORTING BUGS
Report dd bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa