LinuxCommandLibrary

sfddiff

Compare Standard Font Data (SFD) files

SYNOPSIS

sfddiff [options]
sfddiff [options]
sfddiff [options]

PARAMETERS

-h, --help
    Displays a help message and exits.

-V, --version
    Displays version information and exits.

-q, --quiet
    Suppresses non-error messages, showing only the comparison output or errors.

-v, --verbose
    Prints more verbose information about the comparison process.

DESCRIPTION

sfddiff is a command-line utility used to compare the partition table layouts of two specified block devices or disk image files. It provides a diff-like output, highlighting the differences in partitioning schemes, partition types, sizes, and bootable flags.

This tool is particularly useful for verifying disk cloning operations, auditing server configurations, or understanding changes made to disk partitions over time. It can read partition information directly from devices like /dev/sda or from backup files created by tools like sfdisk. Its output is designed to be easily parsable and helps administrators quickly identify discrepancies between disk layouts.

CAVEATS

sfddiff typically compares the raw partition table data, not the file systems within partitions.

For more advanced or robust partition management and comparison, the sfdisk --diff command (introduced in util-linux versions 2.25 and later) is often preferred as it offers more features and better integration with sfdisk's capabilities. sfddiff might be considered a simpler or legacy tool in comparison.

It requires read access to the block devices or files being compared, and using it on a live system without understanding its implications is not recommended.

OUTPUT FORMAT

sfddiff outputs differences in a format similar to the standard diff utility, making it familiar to users accustomed to comparing text files. It highlights lines where partition details vary, indicating additions, deletions, or modifications to partition entries.

INPUT TYPES

The command can compare two block devices (e.g., /dev/sda and /dev/sdb), two files containing partition table dumps (e.g., created by sfdisk -d), or a combination of a device and a file.

HISTORY

sfddiff has been part of the util-linux package for a considerable time, serving as a dedicated utility for comparing disk partition layouts. While sfdisk itself underwent significant development, including the introduction of the sfdisk --diff option in util-linux version 2.25 (around 2014-2015) to integrate comparison functionality directly into sfdisk, sfddiff persists as a standalone, simpler tool for this specific task. Its usage generally predates the more feature-rich sfdisk --diff subcommand.

SEE ALSO

sfdisk(8), fdisk(8), parted(8), diff(1)

Copied to clipboard