ddrescue包装说明

像DD,dd_rescue从一个文件或块设备到另一台做复制数据。您可以指定文件的位置(称为寻求并跳过DD)。有几种不同:

  • dd_rescue不提供的字符转换。
  • 该命令的语法是不同的。呼叫dd_rescue -h。
  • dd_rescue不上的​​错误中止输入文件,除非你指定一个最大的错误号。然后,当达到这个数字dd_rescue将中止。
  • dd_rescue不会截断输出文件,除非要求。
  • 你可以告诉dd_rescue从文件的末尾开始和向后移动。
  • 它使用两个块大小,大的(软),块大小和小(硬)的块大小。在错误的情况下,规模回落到了小的,没有错误的一段时间后,再次提升。 资料来源:http://www.garloff.de/kurt/linux/ddrescue/

ddrescue首页 | 卡利ddrescue回购

  • 作者:garloff
  • 许可:GPL第二版

    0x01 包含在ddrescue软件包工具

    dd_rescue - 从一个文件或块设备复制到另一个数据
    :~# dd_rescue -h
    dd_rescue Version 1.28, 
    , GNU GPL
    ($Id: dd_rescue.c,v 1.130 2012/05/19 20:46:14 garloff Exp $)
    (compiled Dec 15 2012 12:04:22 by gcc (Debian 4.7.2-4) 4.7.2)
    (features: O_DIRECT splice )
    dd_rescue copies data from one file (or block device) to another.
    USAGE: dd_rescue [options] infile outfile
    Options: -s ipos    start position in  input file (default=0),
           -S opos    start position in output file (def=ipos),
           -b softbs  block size for copy operation (def=65536, 1048576 for -d),
           -B hardbs  fallback block size in case of errs (def=4096, 512 for -d),
           -e maxerr  exit after maxerr errors (def=0=infinite),
           -m maxxfer maximum amount of data to be transfered (def=0=inf),
           -y syncfrq frequency of fsync calls on outfile (def=512*softbs),
           -l logfile name of a file to log errors and summary to (def=""),
           -o bbfile  name of a file to log bad blocks numbers (def=""),
           -r         reverse direction copy (def=forward),
           -t         truncate output file (def=no),
           -d/D       use O_DIRECT for input/output (def=no),
           -k         use efficient in-kernel zerocopy splice
           -w         abort on Write errors (def=no),
           -a         spArse file writing (def=no),
           -A         Always write blocks, zeroed if err (def=no),
           -i         interactive: ask before overwriting data (def=no),
           -f         force: skip some sanity checks (def=no),
           -p         preserve: preserve ownership / perms (def=no),
           -q         quiet operation,
           -v         verbose operation,
           -V         display version and exit,
           -h         display this help and exit.
    Sizes may be given in units b(=512), k(=1024), M(=1024^2) or G(1024^3) bytes
    This program is useful to rescue data in case of I/O errors, because
    it does not necessarily abort or truncate the output.
    

    0x02 dd_rescue用法示例

    开始在输入文件的位置 100(-s 100的/ var / log / messages中)和写 ,开始在目标文件 (-S 0的/ tmp / ddrescue出) 的位置0:
    :~# dd_rescue -s 100 /var/log/messages -S 0 /tmp/ddrescue-out
    dd_rescue: (info): Using softbs=65536, hardbs=4096
    dd_rescue: (info) expect to copy 1766kB from /var/log/messages
    dd_rescue: (info): ipos:      1024.1k, opos:      1024.0k, xferd:      1024.0k
                     errs:      0, errxfer:         0.0k, succxfer:      1024.0k
               +curr.rate:  1122807kB/s, avg.rate:  1018906kB/s, avg.load:  0.0%
               >.......................-.................<  57%  ETA:  0:00:00 
    dd_rescue: (info): read /var/log/messages (1767.0k): EOF
    dd_rescue: (info): Summary for /var/log/messages -> /tmp/ddrescue-out:
    dd_rescue: (info): ipos:      1767.0k, opos:      1767.0k, xferd:      1767.0k
                     errs:      0, errxfer:         0.0k, succxfer:      1767.0k
               +curr.rate:   352945kB/s, avg.rate:   568151kB/s, avg.load:  0.0%
               >.......................-................-< 100%  ETA:  0:00:00
    

    原文来自:https://www.hackfun.org/kali-tools/ddrescue_zh.html。转载请注明原出处,商用请联系原作者授权。

results matching ""

    No results matching ""