thats strange, in ordinary case both outputs (stdout & stderr) should be written in the same file using the '&>' operator
This worked for me (maybe your bash version don't support this operator?) and only created the file "logs/jetty.log" which is now 250 KB after three weeks without server restart...
Alternative you can write both outputs using this combination of operators:
this will redirect stdout(1) to the log file and then it will redirect stderr(2) to the same output as stdout(1)
redirecting both outputs to "/dev/null" isn't a good idea because you'll never be able to find server errors... i don't know why these nohup.out was so large in your case, what was the content of the file only jetty output?
Code:
&> /logs/jetty.log
Alternative you can write both outputs using this combination of operators:
Code:
1> logs/jetty.log 2> &1
this will redirect stdout(1) to the log file and then it will redirect stderr(2) to the same output as stdout(1)
Last edited:

