{
    "mode": "man",
    "parameter": "split",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/split/1/json",
    "generated": "2026-06-02T22:31:32Z",
    "synopsis": "split [OPTION]... [FILE [PREFIX]]",
    "sections": {
        "NAME": {
            "content": "split - split a file into pieces\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "split [OPTION]... [FILE [PREFIX]]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Output  pieces  of  FILE  to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default\nPREFIX is 'x'.\n\nWith no FILE, or when FILE is -, read standard input.\n\nMandatory arguments to long options are mandatory for short options too.\n",
            "subsections": [
                {
                    "name": "-a --suffix-length",
                    "content": "generate suffixes of length N (default 2)\n\n--additional-suffix=SUFFIX\nappend an additional SUFFIX to file names\n",
                    "flag": "-a",
                    "long": "--suffix-length"
                },
                {
                    "name": "-b --bytes",
                    "content": "put SIZE bytes per output file\n",
                    "flag": "-b",
                    "long": "--bytes"
                },
                {
                    "name": "-C --line-bytes",
                    "content": "put at most SIZE bytes of records per output file\n",
                    "flag": "-C",
                    "long": "--line-bytes"
                },
                {
                    "name": "-d",
                    "content": "--numeric-suffixes[=FROM]\nsame as -d, but allow setting the start value\n",
                    "flag": "-d"
                },
                {
                    "name": "-x",
                    "content": "--hex-suffixes[=FROM]\nsame as -x, but allow setting the start value\n",
                    "flag": "-x"
                },
                {
                    "name": "-e --elide-empty-files",
                    "content": "do not generate empty output files with '-n'\n\n--filter=COMMAND\nwrite to shell COMMAND; file name is $FILE\n",
                    "flag": "-e",
                    "long": "--elide-empty-files"
                },
                {
                    "name": "-l --lines",
                    "content": "put NUMBER lines/records per output file\n",
                    "flag": "-l",
                    "long": "--lines"
                },
                {
                    "name": "-n --number",
                    "content": "generate CHUNKS output files; see explanation below\n",
                    "flag": "-n",
                    "long": "--number"
                },
                {
                    "name": "-t --separator",
                    "content": "use SEP instead of newline as the record separator;  '\\0'  (zero)  specifies  the  NUL\ncharacter\n",
                    "flag": "-t",
                    "long": "--separator"
                },
                {
                    "name": "-u --unbuffered",
                    "content": "immediately copy input to output with '-n r/...'\n",
                    "flag": "-u",
                    "long": "--unbuffered"
                },
                {
                    "name": "--verbose",
                    "content": "print a diagnostic just before each output file is opened\n\n--help display this help and exit\n",
                    "long": "--verbose"
                },
                {
                    "name": "--version",
                    "content": "output version information and exit\n\nThe  SIZE  argument  is  an  integer  and optional unit (example: 10K is 10*1024).  Units are\nK,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).  Binary prefixes can be used,\ntoo: KiB=K, MiB=M, and so on.\n",
                    "long": "--version"
                },
                {
                    "name": "CHUNKS may be:",
                    "content": "N      split into N files based on size of input\n\nK/N    output Kth of N to stdout\n\nl/N    split into N files without splitting lines/records\n\nl/K/N  output Kth of N to stdout without splitting lines/records\n\nr/N    like 'l' but use round robin distribution\n\nr/K/N  likewise but only output Kth of N to stdout\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "Written by Torbjorn Granlund and Richard M. Stallman.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright  ©  2020 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": "Full documentation <https://www.gnu.org/software/coreutils/split>\nor available locally via: info '(coreutils) split invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                    SPLIT(1)",
            "subsections": []
        }
    },
    "summary": "split - split a file into pieces",
    "flags": [
        {
            "flag": "-a",
            "long": "--suffix-length",
            "arg": null,
            "description": "generate suffixes of length N (default 2) --additional-suffix=SUFFIX append an additional SUFFIX to file names"
        },
        {
            "flag": "-b",
            "long": "--bytes",
            "arg": null,
            "description": "put SIZE bytes per output file"
        },
        {
            "flag": "-C",
            "long": "--line-bytes",
            "arg": null,
            "description": "put at most SIZE bytes of records per output file"
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": "--numeric-suffixes[=FROM] same as -d, but allow setting the start value"
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": "--hex-suffixes[=FROM] same as -x, but allow setting the start value"
        },
        {
            "flag": "-e",
            "long": "--elide-empty-files",
            "arg": null,
            "description": "do not generate empty output files with '-n' --filter=COMMAND write to shell COMMAND; file name is $FILE"
        },
        {
            "flag": "-l",
            "long": "--lines",
            "arg": null,
            "description": "put NUMBER lines/records per output file"
        },
        {
            "flag": "-n",
            "long": "--number",
            "arg": null,
            "description": "generate CHUNKS output files; see explanation below"
        },
        {
            "flag": "-t",
            "long": "--separator",
            "arg": null,
            "description": "use SEP instead of newline as the record separator; '\\0' (zero) specifies the NUL character"
        },
        {
            "flag": "-u",
            "long": "--unbuffered",
            "arg": null,
            "description": "immediately copy input to output with '-n r/...'"
        },
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": "print a diagnostic just before each output file is opened --help display this help and exit"
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "output version information and exit The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000). Binary prefixes can be used, too: KiB=K, MiB=M, and so on."
        }
    ],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Split a file into pieces.",
        "examples": [
            {
                "description": "Split a file, each split having 10 lines (except the last split)",
                "command": "split {{-l|--lines}} 10 {{path/to/file}}"
            },
            {
                "description": "Split a file into 5 files. File is split such that each split has same size (except the last split)",
                "command": "split {{-n|--number}} 5 {{path/to/file}}"
            },
            {
                "description": "Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes and 512m for megabytes)",
                "command": "split {{-b|--bytes}} 512 {{path/to/file}}"
            },
            {
                "description": "Split a file with at most 512 bytes in each split without breaking lines",
                "command": "split {{-C|--line-bytes}} 512 {{path/to/file}}"
            },
            {
                "description": "Split into multiple files from `stdin`",
                "command": "gzip {{-cd|--stdout --decompress}} {{path/to/compressed_file.gz}} | split {{-l|--lines}} {{1000}} - {{path/to/output}}"
            }
        ]
    }
}