{
    "mode": "man",
    "parameter": "xzdiff",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/xzdiff/1/json",
    "generated": "2026-09-20T01:50:56Z",
    "synopsis": "xzcmp [cmpoptions] file1 [file2]\nxzdiff [diffoptions] file1 [file2]\nlzcmp [cmpoptions] file1 [file2]\nlzdiff [diffoptions] file1 [file2]",
    "sections": {
        "NAME": {
            "content": "xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "xzcmp [cmpoptions] file1 [file2]\nxzdiff [diffoptions] file1 [file2]\nlzcmp [cmpoptions] file1 [file2]\nlzdiff [diffoptions] file1 [file2]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "xzcmp  and  xzdiff invoke cmp(1) or diff(1) on files compressed with xz(1), lzma(1), gzip(1),\nbzip2(1), lzop(1), or zstd(1).  All options  specified  are  passed  directly  to  cmp(1)  or\ndiff(1).  If only one file is specified, then the files compared are file1 (which must have a\nsuffix  of a supported compression format) and file1 from which the compression format suffix\nhas been stripped.  If two files are specified, then they are uncompressed if  necessary  and\nfed  to  cmp(1) or diff(1).  The exit status from cmp(1) or diff(1) is preserved unless a de‐\ncompression error occurs; then exit status is 2.\n\nThe names lzcmp and lzdiff are provided for backward compatibility with LZMA Utils.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "cmp(1), diff(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), zdiff(1)\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Messages from the cmp(1) or diff(1) programs refer to temporary filenames  instead  of  those\nspecified.\n\nTukaani                                      2021-06-04                                    XZDIFF(1)",
            "subsections": []
        }
    },
    "summary": "xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "cmp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/cmp/1/json"
        },
        {
            "name": "diff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/diff/1/json"
        },
        {
            "name": "xz",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/xz/1/json"
        },
        {
            "name": "gzip",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gzip/1/json"
        },
        {
            "name": "bzip2",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/bzip2/1/json"
        },
        {
            "name": "lzop",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/lzop/1/json"
        },
        {
            "name": "zstd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/zstd/1/json"
        },
        {
            "name": "zdiff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/zdiff/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Invokes `diff` on files compressed with `xz`, `lzma`, `gzip`, `bzip2`, `lzop`, or `zstd`.",
        "examples": [
            {
                "description": "Compare two files",
                "command": "xzdiff {{path/to/file1}} {{path/to/file2}}"
            },
            {
                "description": "Compare two files, showing the differences side by side",
                "command": "xzdiff --side-by-side {{path/to/file1}} {{path/to/file2}}"
            },
            {
                "description": "Compare two files and report only that they differ (no details on what is different)",
                "command": "xzdiff --brief {{path/to/file1}} {{path/to/file2}}"
            },
            {
                "description": "Compare two files and report when the files are the same",
                "command": "xzdiff --report-identical-files {{path/to/file1}} {{path/to/file2}}"
            },
            {
                "description": "Compare two files using paginated results",
                "command": "xzdiff --paginate {{path/to/file1}} {{path/to/file2}}"
            }
        ]
    }
}