I am using nohup
command to run a java web server application. This is the command i am using:
nohup java -jar WEB-SNAPSHOT.jar &
This command will create a nohup.out
and my server logs are stored in this file. I want this file creation based on date i.e if current date is 2017-10-28, file should be created nohup.2017-10-28.out
and when the date becomes 2017-10-29 12:00 AM nohup.2017-10-29.out
file should be automatically created and so on . Example:
DATE | File
|
2017-10-28 | nohup.2017-10-28.out
2017-10-29 | nohup.2017-10-29.out
2017-10-30 | nohup.2017-10-30.out