{
    "mode": "info",
    "parameter": "sum",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/sum/json",
    "generated": "2026-11-11T09:38:23Z",
    "sections": {
        "File: coreutils.info,  Node: sum invocation,  Next: cksum invocation,  Prev: wc invocation,  Up: Summarizing files": {
            "content": "",
            "subsections": [
                {
                    "name": "6.2 'sum': Print checksum and block counts",
                    "content": "'sum' computes a 16-bit checksum for each given FILE, or standard input\nif none are given or for a FILE of '-'.  Synopsis:\n\nsum [OPTION]... [FILE]...\n\n'sum' prints the checksum for each FILE followed by the number of\nblocks in the file (rounded up).  If at least one FILE is given, file\nnames are also printed.\n\nBy default, GNU 'sum' computes checksums using an algorithm\ncompatible with BSD 'sum' and prints file sizes in units of 1024-byte\nblocks.\n\nThe program accepts the following options.  Also see *note Common\noptions::.\n\n'-r'\nUse the default (BSD compatible) algorithm.  This option is\nincluded for compatibility with the System V 'sum'.  Unless '-s'\nwas also given, it has no effect.\n\n'-s'\n'--sysv'\nCompute checksums using an algorithm compatible with System V\n'sum''s default, and print file sizes in units of 512-byte blocks.\n\n'sum' is provided for compatibility; the 'cksum' program (see next\nsection) is preferable in new applications.\n\nAn exit status of zero indicates success, and a nonzero value\nindicates failure.\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}