I use nohup
quite often for important long running processes under linux
/bash
, so much so that nohup time my command with arguments && mv nohup.out my.log
is almost an idiom for me.
The problem is that nohup
puts both stdout
and stderr
into nohup.out
, and I cannot control the name of the file. This means that if I accidentally start two nohup
s in the same directory, their output will be interleaved in nohup.out
.
The questions are:
How do I deal with this problem? Always running
nohup
s in separate directories and writing a shell function which will first check for./nohup.out
are two sucky options I see.How come I cannot tell
nohup
where to redirect the output? GNU tools tend to have so many options, why notnohup
?