Backgrounding Processes in Linux

This is a post mostly for self-reference:

When you start a really long process (say, a backup) and forget to run it under a screen instance or using &, you can pause the process and resume it in the background with a couple of commands:

$ ./my_backup_script
^Z
[1]+  Stopped                 ./my_backup_script
$ bg 1
[1]+ ./my_backup_script &
$ disown -r

Running disown is important, because it tells the process to continue running after you close your current session.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>