I know I can output script output to a file using :
/path/to/script.sh >& path/to/output.log
The thing is, I'm making an infinite loop in Java that my shell will run, thus the output file will become extremely large.
Is there anyway using linux commands to break the output by max file size to split the logs or instead i have to change outputin Java instead to console to seperate files by max file size?