|
NAME | SYNOPSIS | DESCRIPTION | AUTHOR | REPORTING BUGS | COPYRIGHT | SEE ALSO | COLOPHON |
|
|
|
SPLIT(1) User Commands SPLIT(1)
split - split a file into pieces
split [OPTION]... [FILE [PREFIX]]
Output pieces of FILE to PREFIXaa, PREFIXab, ...; default size is
1000 lines, and default PREFIX is 'x'.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short
options too.
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-a\-a, --suffix-length=N]8;;\
generate suffixes of length N (default 2)
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split--additional-suffix\--additional-suffix=SUFFIX]8;;\
append an additional SUFFIX to file names
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-b\-b, --bytes=SIZE]8;;\
put SIZE bytes per output file
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-C\-C, --line-bytes=SIZE]8;;\
put at most SIZE bytes of records per output file
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-d\-d]8;;\ use numeric suffixes starting at 0, not alphabetic
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split--numeric-suffixes\--numeric-suffixes[=FROM]]8;;\
same as -d, but allow setting the start value
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-x\-x]8;;\ use hex suffixes starting at 0, not alphabetic
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split--hex-suffixes\--hex-suffixes[=FROM]]8;;\
same as -x, but allow setting the start value
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-e\-e, --elide-empty-files]8;;\
do not generate empty output files with '-n'
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split--filter\--filter=COMMAND]8;;\
write to shell COMMAND; file name is $FILE
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-l\-l, --lines=NUMBER]8;;\
put NUMBER lines/records per output file
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-n\-n, --number=CHUNKS]8;;\
generate CHUNKS output files; see explanation below
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-t\-t, --separator=SEP]8;;\
use SEP instead of newline as the record separator; '\0'
(zero) specifies the NUL character
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split-u\-u, --unbuffered]8;;\
immediately copy input to output with '-n r/...'
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#split--verbose\--verbose]8;;\
print a diagnostic just before each output file is opened
]8;;https://www.gnu.org/software/coreutils/split#split--help\--help]8;;\ display this help and exit
]8;;https://www.gnu.org/software/coreutils/split#split--version\--version]8;;\
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,R,Q (powers of 1024) or
KB,MB,... (powers of 1000). Binary prefixes can be used, too:
KiB=K, MiB=M, and so on.
CHUNKS may be:
N split into N files based on size of input
K/N output Kth of N to standard output
l/N split into N files without splitting lines/records
l/K/N output Kth of N to standard output without splitting
lines/records
r/N like 'l' but use round robin distribution
r/K/N likewise but only output Kth of N to standard output
-n (except -nr) will buffer to $TMPDIR, defaulting to /tmp, if the
input size cannot easily be determined.
Written by Torbjorn Granlund and Richard M. Stallman.
Report bugs to: bug-coreutils@gnu.org
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
General help using GNU software: <https://www.gnu.org/gethelp/>
Report any translation bugs to
<https://translationproject.org/team/>
Copyright © 2026 Free Software Foundation, Inc. License GPLv3+:
GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Full documentation <https://www.gnu.org/software/coreutils/split>
or available locally via: info '(coreutils) split invocation'
This page is part of the coreutils (basic file, shell and text
manipulation utilities) project. Information about the project
can be found at ⟨http://www.gnu.org/software/coreutils/⟩. If you
have a bug report for this manual page, see
⟨http://www.gnu.org/software/coreutils/⟩. This page was obtained
from the tarball coreutils-9.11.tar.xz fetched from
⟨http://ftp.gnu.org/gnu/coreutils/⟩ on 2026-05-24. If you
discover any rendering problems in this HTML version of the page,
or you believe there is a better or more up-to-date source for the
page, or you have corrections or improvements to the information
in this COLOPHON (which is not part of the original manual page),
send a mail to man-pages@man7.org
GNU coreutils 9.11 April 2026 SPLIT(1)