I run my script with this command
nohup python a.py > /var/log/a.log 2>&1&
This is okay but every time I run this command /var/log/a.log file is truncated. Is there a way to append this file no matter what?
I run my script with this command
nohup python a.py > /var/log/a.log 2>&1&
This is okay but every time I run this command /var/log/a.log file is truncated. Is there a way to append this file no matter what?
Try the below command to append the output as well as the standard error to
/var/log/a.log
file.>>
- Append>
- Overwrite