1

According to the man page:

-b, --bytes=SIZE
put SIZE bytes per output file

-C, --line-bytes=SIZE
put at most SIZE bytes of lines per output file

So if -b already splits a file by bytes per file, what is the purpose of -C? How is it any different?

1 Answers1

1

-C attempts to put complete lines of output into the target file, up to a maximum size of SIZE, whereas -b just counts bytes without regards to line endings. -C may put less output into the output file in order to stop at the closest line ending that doesn't put it over size.

Tim Kennedy
  • 19,697
  • 1
    So -C is like: "Give me complete lines, but do not exceed SIZE", and -b is like: "I want exactly SIZE unless there isn't anything left". Is that right? – Jeff Reeves Feb 02 '18 at 00:21
  • That's it in a nutshell. Much more succinctly explained than my answer. :) – Tim Kennedy Feb 02 '18 at 17:51