So I start some server with nohup ./myServer &, I actually have loging mon my server so I do not need any help from nohup with it, but any way I get 66GB nohup.out file in fiew days and that is a problem. I want just to start an app, leve it working on its own. So how to make nohup not create any output files and so not eat any space?
Asked
Active
Viewed 2.3k times
21
Kabumbus
- 353
- 1
- 2
- 7
1 Answers
32
Redirect the output to /dev/null:
nohup ./myServer >& /dev/null &
Alternatively, if you want to discard the standard output but keep the standard error, you could use this:
nohup ./myServer > /dev/null &
You can find more details here if you need more control over the redirections (using bash):
Bruno
- 1,073
- 2
- 14
- 18