← 返回命令列表

Linux command

bsdiff 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Create a binary patch

bsdiff [oldfile] [newfile] [patch.bsdiff]

Apply a binary patch

bspatch [oldfile] [newfile] [patch.bsdiff]

说明

bsdiff and bspatch create and apply binary patches between two files. Unlike text-oriented diff/patch, these tools work on any binary data, making them ideal for distributing software updates where only the changes need to be transmitted. bsdiff uses a suffix sorting algorithm to efficiently identify similarities between binary files, producing highly compressed patches. Even files with different internal layouts (like executables after recompilation) often produce small patches. The patch files are compressed with bzip2, further reducing size. bspatch reconstructs the new file exactly from the old file and patch, which can be verified via checksums.

FAQ

What is the bsdiff command used for?

bsdiff and bspatch create and apply binary patches between two files. Unlike text-oriented diff/patch, these tools work on any binary data, making them ideal for distributing software updates where only the changes need to be transmitted. bsdiff uses a suffix sorting algorithm to efficiently identify similarities between binary files, producing highly compressed patches. Even files with different internal layouts (like executables after recompilation) often produce small patches. The patch files are compressed with bzip2, further reducing size. bspatch reconstructs the new file exactly from the old file and patch, which can be verified via checksums.

How do I run a basic bsdiff example?

Run `bsdiff [oldfile] [newfile] [patch.bsdiff]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more bsdiff examples?

This page includes 2 examples for bsdiff, plus related commands for nearby Linux tasks.