I have a long running process and I expect the log files to run into multiple hundreds of GBs. The program is a pre-compiled binary - so I can't modify the logic in the code.
Is there a command like tool (like tee
) to which I can redirect my output. This tool would then write the stdout of my long running process to disk and start writing a new file as soon as I hit a certain limit (say, 1GB).
Here's what I have in mind:
%> long-running.sh | responsible-logger --max-length 1G output%02d.log