Skip to main content
100%

Split large file by number of lines

✓ Published0🌍 Public
WWilliamQLiu
Last edited Feb 8, 2015
Created on Feb 8, 2015

This example demonstrates how to split a large file into smaller, more manageable pieces by specifying a line count. It shows the command-line utility `split` dividing a source file into multiple output files, each containing exactly one million lines. The code uses the `-l` flag to set the line limit and a prefix (`data.`) to generate sequential filenames like `data.aa`, `data.ab`, and `data.ac`. The rendering approach is purely text-based, illustrating a shell command and its expected output files.

AI-generated description

Similar vizzes