Issue
I am running a java application using the nohup command.
nohup java -jar test.jar
I am using log4j to write output from my application. In the log4j.properties file, I have a file this writes the output. The problem is that I have the same output twice in nohup.out and in test.log(I have configured this in the log4j.properties file)
Is there a way of disabling the writing of the output to nohup.out?
Solution
You can redirect nohup output to /dev/null.
nohup java -jar test.jar >/dev/null
Answered By - Vivek Goel