Section: split and csplit

Split a file by size

bash
bash
split -b 50M archive.log log_
Explanation

Size-based splitting is common when moving large files through constrained systems.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing split and csplit
Split a file by line count
Create chunks of 1000 lines each.
OpenIn sheetbashsame section
Use numeric suffixes
Create chunks with numeric names.
OpenIn sheetbashsame section
Split using regex boundaries
Break a file at repeated pattern boundaries.
OpenIn sheetbashsame section
Find the largest files in a tree
List the top 20 largest files by size.
OpenIn sheetbash1 tag match
Pass stdin items as arguments
Convert lines into command arguments.
Show unified diff
Compare two text files with context.