| 1 |
dd-about = 复制并可选地转换文件系统资源 |
| 2 |
dd-usage = |
| 3 |
dd [操作]... |
| 4 |
dd 选项 |
| 5 |
dd-error-failed-to-open = 打开 { $path } 失败 |
| 6 |
dd-error-write-error = 写入错误 |
| 7 |
dd-error-failed-to-seek = 在输出文件中寻址 (seek) 失败 |
| 8 |
dd-error-io-error = IO 错误 |
| 9 |
dd-error-cannot-skip-offset = "{ $file }": 无法跳至指定偏移量 |
| 10 |
dd-error-cannot-skip-invalid = "{ $file }": 无法跳过 (skip): 无效的参数 |
| 11 |
dd-after-help = |
| 12 |
### 操作 |
| 13 |
|
| 14 |
- bs=字节数 : 一次读取和写入的字节数(默认:512); |
| 15 |
会覆盖 ibs 和 obs 的值。 |
| 16 |
- cbs=字节数 : 一次转换的字节数。应用到 |
| 17 |
conv=block 与 conv=unblock 操作。 |
| 18 |
- conv=转换 : 以逗号分隔的转换选项列表列表或 |
| 19 |
(出于兼容性考虑)文件标志。 |
| 20 |
- count=N : 只复制 N 个输入块,而不是持续到文件末尾。 |
| 21 |
若需在达到N字节后停止,请查看 flag=count_bytes |
| 22 |
- ibs=字节数 : 一次读取的字节数(默认:512) |
| 23 |
- if=FILE : the file used for input. When not specified, stdin is used instead |
| 24 |
- iflag=FLAGS : a comma-separated list of input flags which specify how the |
| 25 |
input source is treated. FLAGS may be any of the input-flags or general-flags |
| 26 |
specified below. |
| 27 |
- skip=N (or iseek=N) : skip N ibs-sized records into input before beginning |
| 28 |
copy/convert operations. See iflag=seek_bytes if seeking N bytes is preferred. |
| 29 |
- obs=字节数 : 一次写入的字节数(默认:512) |
| 30 |
- of=FILE : the file used for output. When not specified, stdout is used |
| 31 |
instead |
| 32 |
- oflag=FLAGS : comma separated list of output flags which specify how the |
| 33 |
output source is treated. FLAGS may be any of the output flags or general |
| 34 |
flags specified below |
| 35 |
- seek=N (or oseek=N) : seeks N obs-sized records into output before |
| 36 |
beginning copy/convert operations. See oflag=seek_bytes if seeking N bytes is |
| 37 |
preferred |
| 38 |
- status=LEVEL : controls whether volume and performance stats are written to |
| 39 |
stderr. |
| 40 |
|
| 41 |
When unspecified, dd will print stats upon completion. An example is below. |
| 42 |
|
| 43 |
```plain |
| 44 |
输入了 6+0 块记录 |
| 45 |
输出了 16+0 块记录 |
| 46 |
8192 字节 (8.2 kB, 8.0 KiB) 已复制,0.00057009 s,14.4 MB/s |
| 47 |
``` |
| 48 |
|
| 49 |
The first two lines are the 'volume' stats and the final line is the |
| 50 |
'performance' stats. |
| 51 |
The volume stats indicate the number of complete and partial ibs-sized reads, |
| 52 |
or obs-sized writes that took place during the copy. The format of the volume |
| 53 |
stats is <complete>+<partial>. If records have been truncated (see |
| 54 |
conv=block), the volume stats will contain the number of truncated records. |
| 55 |
|
| 56 |
Possible LEVEL values are: |
| 57 |
- progress : Print periodic performance stats as the copy proceeds. |
| 58 |
- noxfer : Print final volume stats, but not performance stats. |
| 59 |
- none : Do not print any stats. |
| 60 |
|
| 61 |
Printing performance stats is also triggered by the INFO signal (where supported), |
| 62 |
or the USR1 signal. Setting the POSIXLY_CORRECT environment variable to any value |
| 63 |
(including an empty value) will cause the USR1 signal to be ignored. |
| 64 |
|
| 65 |
### Conversion Options |
| 66 |
|
| 67 |
- ascii : convert from EBCDIC to ASCII. This is the inverse of the ebcdic |
| 68 |
option. Implies conv=unblock. |
| 69 |
- ebcdic : convert from ASCII to EBCDIC. This is the inverse of the ascii |
| 70 |
option. Implies conv=block. |
| 71 |
- ibm : convert from ASCII to EBCDIC, applying the conventions for [, ] |
| 72 |
and ~ specified in POSIX. Implies conv=block. |
| 73 |
|
| 74 |
- ucase : convert from lower-case to upper-case. |
| 75 |
- lcase : converts from upper-case to lower-case. |
| 76 |
|
| 77 |
- block : for each newline less than the size indicated by cbs=BYTES, remove |
| 78 |
the newline and pad with spaces up to cbs. Lines longer than cbs are truncated. |
| 79 |
- unblock : for each block of input of the size indicated by cbs=BYTES, remove |
| 80 |
right-trailing spaces and replace with a newline character. |
| 81 |
|
| 82 |
- sparse : attempts to seek the output when an obs-sized block consists of |
| 83 |
only zeros. |
| 84 |
- swab : swaps each adjacent pair of bytes. If an odd number of bytes is |
| 85 |
present, the final byte is omitted. |
| 86 |
- sync : pad each ibs-sided block with zeros. If block or unblock is |
| 87 |
specified, pad with spaces instead. |
| 88 |
- excl : the output file must be created. Fail if the output file is already |
| 89 |
present. |
| 90 |
- nocreat : the output file will not be created. Fail if the output file in |
| 91 |
not already present. |
| 92 |
- notrunc : the output file will not be truncated. If this option is not |
| 93 |
present, output will be truncated when opened. |
| 94 |
- noerror : all read errors will be ignored. If this option is not present, |
| 95 |
dd will only ignore Error::Interrupted. |
| 96 |
- fdatasync : data will be written before finishing. |
| 97 |
- fsync : data and metadata will be written before finishing. |
| 98 |
|
| 99 |
### Input flags |
| 100 |
|
| 101 |
- count_bytes : a value to count=N will be interpreted as bytes. |
| 102 |
- skip_bytes : a value to skip=N will be interpreted as bytes. |
| 103 |
- fullblock : wait for ibs bytes from each read. zero-length reads are still |
| 104 |
considered EOF. |
| 105 |
|
| 106 |
### Output flags |
| 107 |
|
| 108 |
- append : open file in append mode. Consider setting conv=notrunc as well. |
| 109 |
- seek_bytes : a value to seek=N will be interpreted as bytes. |
| 110 |
|
| 111 |
### General Flags |
| 112 |
|
| 113 |
- direct : use direct I/O for data. |
| 114 |
- directory : fail unless the given input (if used as an iflag) or |
| 115 |
output (if used as an oflag) is a directory. |
| 116 |
- dsync : use synchronized I/O for data. |
| 117 |
- sync : use synchronized I/O for data and metadata. |
| 118 |
- nonblock : use non-blocking I/O. |
| 119 |
- noatime : do not update access time. |
| 120 |
- nocache : request that OS drop cache. |
| 121 |
- noctty : do not assign a controlling tty. |
| 122 |
- nofollow : do not follow system links. |