I know how I can use CTRL-Z
and bg
to run a script in the background, and then fg <number>
to bring it back by its number in jobs
. However, after logging out and logging back in, jobs
does not show this information. ps aux | grep
still shows that the script is running. How can I still manage scripts and bring them back into the foreground after I have logged out and then logged back in, all through terminal?
Also, if I have sent a script into the background and then logged out, and it runs into an error sometime, how will I find out about the error after logging back in?