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?


-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.

| improve this answer | |
  • 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 2 '18 at 0:21
  • That's it in a nutshell. Much more succinctly explained than my answer. :) – Tim Kennedy Feb 2 '18 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.