If you don't need the features or want the overhead of any of these typical tools for managing detachable processes:
- GNU screen
- byobu
- dtach
- tmux
- vnc
- xpra
you can keep track of the output from a process by prefixing your command with nohup when you start it up. By default, it will save both standard output and standard error to nohup.out
, but see the man page for additional details.
nohup won't let you interact with the process once it's been detached, but it will allow the script to complete and allow you to view the output after the fact. For more complex cases, such as long-running interactive processes or X clients, you may want to look at one of the other tools listed and see if they fit your needs better.
1Screen - 3rd party?? – Linker3000 – 2011-02-10T23:35:15.957
@Linker3000 I meant additional xD but couldn't find the correct word when writing my edit... – BloodPhilia – 2011-02-10T23:37:14.157
1you can then watch the log file in near realtime with 'tail scriptlog.log' – Journeyman Geek – 2011-02-11T00:00:46.647
or (possibly) even better;
tail -f scriptlog.log
– Eroen – 2012-04-20T22:43:50.507