Advanced

Software Review: BDiff

Posted by dave on Jan 19, 2004 11:56 AM · Post a comment
LXer; By Dave Whitinger

bdiff is a "binary diff" and, rather than going line by line, it goes byte by byte.

Since migrating to the MyISAM table format of MySQL, I have had to use the --opt option to mysqldump in order to make SQL files that can be imported in a reasonable amount of time.

The unfortunate side effect of --opt, however, is that each table is turned into one long line (and a 120 meg table makes a VERY long line!).

Alas, when creating a diff of yesterday's table to today's table, now the entire table is included in the patch file because that single line (the 120 meg line) has been changed. :( What I need is a byte-by-byte diff, rather than a line-by-line diff.

Enter a handy tool called bdiff.

bdiff is a "binary diff" and, rather than going line by line, it goes byte by byte. It produced a 2KB patchfile from a 47 meg database, for example, while the standard diff utility produced a patch that was actually bigger than the original! And, bdiff is quite fast!

I have found my new diff utility. Ahhh, a man and his tools. :)

Dave

Return to the LXer Features

Comments

No comments yet. Be the first.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post

LXer

  Latest Features
bob: LXer now speaks Markdown
Oct 27, 2026

bob: How to protect against PHP2Shell
Oct 26, 2026

Scott Ruecker (San Diego, U.S.): Linux That's Small
Oct 14, 2024

penguinist: Encryption, Trust, and the Hidden Dangers of Vendor-Controlled Data
Aug 27, 2024

Scott Ruecker (San Diego, U.S.): My Linux Mint Tribute
Aug 23, 2024

Scott Ruecker (San Diego, U.S.): How I Turned My Chromebook Into A "Mintbook"
Jul 08, 2024

Scott Ruecker (San Diego, U.S.): Adventures With My New Chromebook
Jun 10, 2024

Scott Ruecker: My Linux Laptop
May 08, 2022

Scott Ruecker: Laptop Dual Boot Project: Part 2
Nov 30, 2021

Scott Ruecker: Laptop Dual Boot Project
Nov 30, 2020


View all

  Search Features

Search LXer Features:

[ Copyright © LXer | All times are recorded in Central Daylight Time (CDT) ]

[ Contact Us | Privacy Policy | Terms of Service | About us | rss | Mobile ]

Login