Skip to Content
gnux

-n, --number

Generate CHUNKS output files: N, K/N, l/N, l/K/N, r/N or r/K/N.

An option of splitx.

Usage

splitx -n CHUNKS [FILE [PREFIX]]
splitx --number=CHUNKS [FILE [PREFIX]]

Details

ShortLongValueDefaultMeaning
-n--numberCHUNKSgenerate CHUNKS output files: N, K/N, l/N, l/K/N, r/N or r/K/N

Examples

Split a log into 4 roughly equal parts for 4 parallel workers, without cutting a line in half

splitx -n l/4 access.log chunk-

Deal a list of URLs out to 3 crawlers in turn

splitx -n r/3 urls.txt crawler-

Look at just the third quarter of a huge file without writing any pieces

splitx -n l/3/4 huge.log | headx

Help in the terminal

gnux help splitx --number

On this page