SPLIT(1)
π NAME π
split β the girl who takes one file and goes "okay bestie we're dividing you" and splits it into pieces βοΈβ¨
π¦ SYNOPSIS π¦
split [OPTION]... [FILE [PREFIX]]
β¨ DESCRIPTION β¨
So what she does is: she takes your FILE and she outputs pieces of it into PREFIXaa, PREFIXab, ... β like, literally one after the other, aa then ab then ac, iconic naming behavior π
Default size is 1000 lines per piece, and the default PREFIX is 'x'. So yeah, if you just run her with nothing, you get xaa, xab, xac... and that's the whole vibe π
If you give her no FILE at all, or if FILE is -, she reads from standard input. She's flexible like that π«Ά
Also important, bestie: mandatory arguments to long options are mandatory for short options too. So if a long option needs a value, the short version needs it too. No shortcuts around the shortcut, periodt.
π Options π
-a,--suffix-length=Nβ generate suffixes that are lengthN(default is2, as in the classicaa,absituation)--additional-suffix=SUFFIXβ tack an extraSUFFIXonto the end of the file names. Extra seasoning π-b,--bytes=SIZEβ putSIZEbytes in each output file-C,--line-bytes=SIZEβ put at mostSIZEbytes of records per output file (so she won't cut a record in half, she just caps it)-dβ use numeric suffixes starting at0instead of alphabetic ones. Numbers only, no letters, slay π’--numeric-suffixes[=FROM]β same as-d, but you get to set the starting value withFROMπ-xβ use hex suffixes starting at0instead of alphabetic ones--hex-suffixes[=FROM]β same as-x, but you get to set the starting value withFROM-e,--elide-empty-filesβ don't generate empty output files when you're using'-n'. We do not keep the empty ones, they go home π«--filter=COMMANDβ write to the shellCOMMANDinstead of a file; the file name shows up as$FILEfor it-l,--lines=NUMBERβ putNUMBERlines/records per output file-n,--number=CHUNKSβ generateCHUNKSoutput files; there's a whole explanation below, don't worry-t,--separator=SEPβ useSEPinstead of a newline as the record separator;'\0'(zero) means the NUL character-u,--unbufferedβ immediately copy input to output with'-n r/...'--verboseβ print a diagnostic just before each output file is opened. She's gonna narrate, and honestly? fair π’--helpβ display this help and exit--versionβ output version information and exit
π§ About that SIZE argument π§
The SIZE argument is an integer, and it can have an optional unit β for 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 work too, bestie: KiB=K, MiB=M, and so on down the line π
πΈ CHUNKS may be: πΈ
Nβ split intoNfiles based on size of inputK/Nβ output theKth ofNto standard outputl/Nβ split intoNfiles without splitting lines/recordsl/K/Nβ output theKth ofNto standard output without splitting lines/recordsr/Nβ like'l'but use round robin distribution (she's taking turns, very fair of her π)r/K/Nβ likewise, but only output theKth ofNto standard output
Heads up:-n(except-nr) will buffer to$TMPDIR, defaulting to/tmp, if the input size cannot easily be determined. So yeah, she might stash stuff in your temp dir while she figures things out. Not a vibe killer, just so you know π
π AUTHOR π
Written by Torbjorn Granlund and Richard M. Stallman. Legends, honestly π
πΈ REPORTING BUGS πΈ
Found a bug? Tell the people, don't suffer in silence π
- 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/
π SEE ALSO π
Full documentation lives at https://www.gnu.org/software/coreutils/split, or you can get it locally via:
info '(coreutils) split invocation'
Packaged by Ubuntu (9.10-1ubuntu2).
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.
okay and that's the whole page bestie β this is GNU coreutils 9.10, dated August 2026, and you just read SPLIT(1) in full. go forth and fragment responsibly, ily π«Άβ¨
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms