split


split 1 billion lines per file

split -d -l 1000000000 <input>  <output>
# -d    output file names to end w/ 1,2,3,...
# -l    lines in each file

split by size

split -b 200M <input>  <output>
# -b    bytes

csplit can use regex for splitting

csplit <input> 4 {1}

EOF

Previous
Next