Linux command
rdiff 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Create signature file
rdiff signature [original] [signature.sig]
Create delta from signature
rdiff delta [signature.sig] [new_file] [delta.delta]
Apply delta to recreate
rdiff patch [original] [delta.delta] [output]
说明
rdiff computes and applies binary deltas using the rsync algorithm. It enables efficient file synchronization by transferring only the differences between files.
参数
- -b _blocksize_
- Block size (bytes) for the signature. Smaller = more accurate delta but larger signature.
- -s, --statistics
- Print signature / delta timing and size statistics.
- -S _sum_
- Length (bytes) of the strong checksum in the signature (default 8).
- -H _hash_
- Hash algorithm: `md4` (legacy) or `blake2` (default for librsync ≥ 2).
- -R, --rollsum, -I, --rabinkarp
- Select the rolling checksum variant (rabinkarp is the default).
- -f, --force
- Overwrite the output file if it already exists.
- -z, --compress _FORMAT_
- Compress deltas with `gzip` or `bzip2` when writing.
- -v, --verbose
- Increase verbosity. Repeat for more detail.
- -V, --version
- Print librsync version and exit.
FAQ
What is the rdiff command used for?
rdiff computes and applies binary deltas using the rsync algorithm. It enables efficient file synchronization by transferring only the differences between files.
How do I run a basic rdiff example?
Run `rdiff signature [original] [signature.sig]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -b _blocksize_ do in rdiff?
Block size (bytes) for the signature. Smaller = more accurate delta but larger signature.