{
    "content": [
        {
            "type": "text",
            "text": "# cmp (man)\n\n## NAME\n\ncmp - compare two files byte by byte\n\n## SYNOPSIS\n\ncmp [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n\n## DESCRIPTION\n\nCompare two files byte by byte.\n\n## TLDR\n\n> Compare two files byte by byte.\n\n- Output char and line number of the first difference between two files:\n  `cmp {{path/to/file1}} {{path/to/file2}}`\n- Output info of the first difference: char, line number, bytes, and values:\n  `cmp {{-b|--print-bytes}} {{path/to/file1}} {{path/to/file2}}`\n- Output the byte numbers and values of every difference:\n  `cmp {{-l|--verbose}} {{path/to/file1}} {{path/to/file2}}`\n- Compare files but output nothing, yield only the exit status:\n  `cmp {{-s|--quiet}} {{path/to/file1}} {{path/to/file2}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (7 subsections)\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "cmp",
        "section": "",
        "mode": "man",
        "summary": "cmp - compare two files byte by byte",
        "synopsis": "cmp [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]",
        "tldr_summary": "Compare two files byte by byte.",
        "tldr_examples": [
            {
                "description": "Output char and line number of the first difference between two files",
                "command": "cmp {{path/to/file1}} {{path/to/file2}}"
            },
            {
                "description": "Output info of the first difference: char, line number, bytes, and values",
                "command": "cmp {{-b|--print-bytes}} {{path/to/file1}} {{path/to/file2}}"
            },
            {
                "description": "Output the byte numbers and values of every difference",
                "command": "cmp {{-l|--verbose}} {{path/to/file1}} {{path/to/file2}}"
            },
            {
                "description": "Compare files but output nothing, yield only the exit status",
                "command": "cmp {{-s|--quiet}} {{path/to/file1}} {{path/to/file2}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-b",
                "long": "--print-bytes",
                "arg": null,
                "description": "print differing bytes"
            },
            {
                "flag": "-i",
                "long": "--ignore-initial",
                "arg": null,
                "description": "skip first SKIP bytes of both inputs"
            },
            {
                "flag": "-i",
                "long": "--ignore-initial",
                "arg": null,
                "description": "skip first SKIP1 bytes of FILE1 and first SKIP2 bytes of FILE2"
            },
            {
                "flag": "-l",
                "long": "--verbose",
                "arg": null,
                "description": "output byte numbers and differing byte values"
            },
            {
                "flag": "-n",
                "long": "--bytes",
                "arg": null,
                "description": "compare at most LIMIT bytes"
            },
            {
                "flag": "-s",
                "long": "--silent",
                "arg": null,
                "description": "suppress all normal output --help display this help and exit"
            },
            {
                "flag": "-v",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit SKIP values may be followed by the following multiplicative suffixes: kB 1000, K 1024, MB 1,000,000, M 1,048,576, GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y. If a FILE is '-' or missing, read standard input. Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "diff",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/diff/1/json"
            },
            {
                "name": "diff3",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/diff3/1/json"
            },
            {
                "name": "sdiff",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/sdiff/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": [
                    {
                        "name": "-b --print-bytes",
                        "lines": 2,
                        "flag": "-b",
                        "long": "--print-bytes"
                    },
                    {
                        "name": "-i --ignore-initial",
                        "lines": 2,
                        "flag": "-i",
                        "long": "--ignore-initial"
                    },
                    {
                        "name": "-i --ignore-initial",
                        "lines": 2,
                        "flag": "-i",
                        "long": "--ignore-initial"
                    },
                    {
                        "name": "-l --verbose",
                        "lines": 2,
                        "flag": "-l",
                        "long": "--verbose"
                    },
                    {
                        "name": "-n --bytes",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--bytes"
                    },
                    {
                        "name": "-s --quiet --silent",
                        "lines": 4,
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "-v --version",
                        "lines": 8,
                        "flag": "-v",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 12,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "cmp - compare two files byte by byte\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "cmp [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Compare two files byte by byte.\n\nThe  optional  SKIP1  and  SKIP2 specify the number of bytes to skip at the beginning of each\nfile (zero by default).\n\nMandatory arguments to long options are mandatory for short options too.\n",
                "subsections": [
                    {
                        "name": "-b --print-bytes",
                        "content": "print differing bytes\n",
                        "flag": "-b",
                        "long": "--print-bytes"
                    },
                    {
                        "name": "-i --ignore-initial",
                        "content": "skip first SKIP bytes of both inputs\n",
                        "flag": "-i",
                        "long": "--ignore-initial"
                    },
                    {
                        "name": "-i --ignore-initial",
                        "content": "skip first SKIP1 bytes of FILE1 and first SKIP2 bytes of FILE2\n",
                        "flag": "-i",
                        "long": "--ignore-initial"
                    },
                    {
                        "name": "-l --verbose",
                        "content": "output byte numbers and differing byte values\n",
                        "flag": "-l",
                        "long": "--verbose"
                    },
                    {
                        "name": "-n --bytes",
                        "content": "compare at most LIMIT bytes\n",
                        "flag": "-n",
                        "long": "--bytes"
                    },
                    {
                        "name": "-s --quiet --silent",
                        "content": "suppress all normal output\n\n--help display this help and exit\n",
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "-v --version",
                        "content": "output version information and exit\n\nSKIP values may be followed by the following multiplicative suffixes: kB  1000,  K  1024,  MB\n1,000,000, M 1,048,576, GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y.\n\nIf a FILE is '-' or missing, read standard input.  Exit status is 0 if inputs are the same, 1\nif different, 2 if trouble.\n",
                        "flag": "-v",
                        "long": "--version"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written by Torbjorn Granlund and David MacKenzie.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "Report bugs to: bug-diffutils@gnu.org\nGNU diffutils home page: <https://www.gnu.org/software/diffutils/>\nGeneral help using GNU software: <https://www.gnu.org/gethelp/>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright © 2021 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3  or  later\n<https://gnu.org/licenses/gpl.html>.\nThis  is free software: you are free to change and redistribute it.  There is NO WARRANTY, to\nthe extent permitted by law.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "diff(1), diff3(1), sdiff(1)\n\nThe full documentation for cmp is maintained as a Texinfo manual.  If the info and  cmp  pro‐\ngrams are properly installed at your site, the command\n\ninfo cmp\n\nshould give you access to the complete manual.\n\n\n\ndiffutils 3.8                                August 2021                                      CMP(1)",
                "subsections": []
            }
        }
    }
}