How to split log/bin files, in-flight/on-command?

See How to trim down a log file? - #11 by amilcarlucas for an example