RFDD

RFDD 类似于UNIX DD工具,用于复制文件并对原文件的内容进行转换和格式化处理,用的比较多的是用来备份物理硬盘,并且通过RFSD服务,实现对远程文件的操作。建议在需要时,对本地或远程物理磁盘进行操作。

版本: 1.7.2.0 更新: 2024-2-29
功能特性
如何安装
使用curl
curl http://dl.ranfs.com/pub/rfdd/all/get.sh -o -|sh -s /usr/local/bin
使用wget
wget http://dl.ranfs.com/pub/rfdd/all/get.sh -O -|sh -s /usr/local/bin
使用powershell
$rfdd_dir="c:\rfdd";Invoke-Expression(New-Object Net.WebClient).DownloadString("http://dl.ranfs.com/pub/rfdd/all/get.ps1")
安装路径

在Linux和Macosx上,默认安装路径在 /usr/local/bin ,如果需要指定其它路径,请更改 sh -s 后面的路径配置。

Windows上,默认安装路径在 c:\rfdd ,如果需要指定其它路径,请更改 $rfdd_dir= 后面的路径配置。

使用帮助
$ rfdd -h
rfdd v1.7.2.0 (2024-2-29) [little] - convert and copy a file [staic]
Copyright (C) 2014-2024 ranfs.com
usage: rfdd [if=FILE] [of=FILE] [ibs=N] [obs=N] [bs=N] [count=N] [skip=N]
[seek=N] conv=[notrunc|noerror|sync|fsync|resume]
iflag=[skip_bytes|direct|file] oflag=[seek_bytes|direct|file]
status=[noxfer|none|md5|sha1] retry=NUM level=[LEVEL]
	bs=BYTES    read and write BYTES bytes at a time
	ibs=N       Read N bytes at a time
	obs=N       Write N bytes at a time
	count=N     copy only N input blocksn
	seek=BLOCKS skip BLOCKS obs-sized blocks at start of output
	skip=BLOCKS skip BLOCKS ibs-sized blocks at start of input
	offset=BLOCKS offset BLOCKS at input and output default is bytes
	if=FILE     read from FILE instead of stdin
	of=FILE     write to FILE instead of stdout
	conv=CONVS  [notrunc,noerror,sync,fsync,swab,resume,]
	conv=notrunc   Don't truncate output file
	conv=noerror   Continue after read errors
	conv=bad_read  Allows damaged sector fills to continue reading
	conv=sync      Pad blocks with zeros
	conv=fsync     Physically write data out before finishing
	conv=swab      Swap every pair of bytes
	conv=resume    Continue writing at the end of the output file
	conv=off_blocks offset=N is in BLOCKS
	conv=cal_one_task [hash bcount] is computed using one thread
	conv=cal_force_local [hash bcount] force local calculation
	iflag=skip_bytes skip=N is in bytes
	oflag=seek_bytes seek=N is in bytes
	iflag=direct   use direct I/O for data
	iflag=file Open as a file, otherwise parse as a supported image format
	iflag=vss   use windows shadow copy file
	retry_timeout_minutes=NUM  Retry limit time minutes
	retry_delay_seconds=NUM  Retry delay interval seconds
	bad_fill_str=STR Write Pattern dor damaged source sectors
	bad_skip_sectors=NUM Avoid damaged areas, skip sectors
	bad_retry_count=NUM maximum number of retries for a sector read error
	disable_os_hibernate=[1|0] Prohibit os hibernate during operation
	disable_pack_transport=[1|0] disable pack transport
	cool_down=[N-N] specify the duty-cycle for cooling down the device
	bs_count=[1-4096] The number of hash blocks is cal each time
	clear_mode=[00-100] 00-FF [100] clear characters for random
	hash_mode=[md5|sha1|sha256|sha512|sm3|xxh3] Calculate hash [+p...]
	bcount_mode=[u8] Calculate the distribution of data
	diff_mode=[byte|bs|bin] Compare mode
	diff_max_count=[1-8192] Record the maximum number of different positions
	sync_mode=[auto] Synchronize file data
	status=noxfer  Suppress rate output
	status=none    Suppress all output
	status=md5     output MD5 value of copy data
	proxy_name=[name] rf_proxy.ini proxy_name
	proxy_url=[http|sock4|sock5] set proxy url
	level=LEVEL    set log level: [verb, dbg, info, warn, err]
may be suffixed by b(512), kB(1000), k(1024), MB(1000000), M, GB, G, TB, T
使用例子

假定rfsd运行在192.168.1.1的资源极少的Linux系统上,现在要备份硬盘数据本地的windows d:\1.img

rfdd if=rfp://192.168.1.1/dev/sda of=d:\1.img

注意:bs默认2MB字节,如果网络性能很不好,建议减小bs大小,比如:bs=200k。


相关资源
Windows
Macosx
iPhone iPad
Linux Android
FreeBSD