This is a common question: how can I run nohup without creating the annoying nohup.out ? And the common answer is: you can’t. But this is not exactly true.

Some people have a dreadful habit of starting their applications using nohup with debug sent to stdout. The nohup.out will never be “rotated”, like a log file. It will keep growing until it consumes all available space. Even if you delete it or empty it out, the filesystem space will not be released, until the process wring to the file is terminated.

And so without further ado, lo and behold: running nohup without creating nohup.out:

And here’s a little example. First, I rsync /etc to /etc_mirror using nohup to keep it running in the background:

Here I repeat the same process with the </dev/null addition:


Leave A Reply

Please enter your comment!
Please enter your name here