split
TLDR
Split file into 1000-line pieces
SYNOPSIS
split [options] [file [prefix]]
DESCRIPTION
split divides a file into smaller pieces. By default, it creates files with 1000 lines each, named with a prefix (default: x) followed by a suffix (aa, ab, ac, ...).
The command is useful for breaking large files for transmission, processing, or storage limitations. It works with both text and binary files.
Size specifications accept suffixes: K (kilobytes), M (megabytes), G (gigabytes), and also KB, MB, GB for powers of 1000.
Split reads from stdin if no file is specified or if file is -.
PARAMETERS
-l lines, --lines=lines
Put specified number of lines per output file-b size, --bytes=size
Put specified bytes per output file (K, M, G suffixes)-n chunks, --number=chunks
Generate specified number of output files-d, --numeric-suffixes
Use numeric suffixes instead of alphabetic-a N, --suffix-length=N
Generate suffixes of length N (default: 2)-e, --elide-empty-files
Do not generate empty output files with -n--verbose
Print message for each output file--additional-suffix=suf
Append additional suffix to file names-x, --hex-suffixes
Use hexadecimal suffixes
CAVEATS
The default 2-character suffix limits output to 676 files (aa-zz). Use -a to increase suffix length for more pieces, or -d for numeric suffixes.
When splitting binary files, use -b (bytes) not -l (lines) to avoid corruption at arbitrary byte boundaries.
To reassemble, use cat prefix\* > original_file. Ensure files are concatenated in correct alphabetical/numerical order.


