Linux - ジョブをバックグラウンドの実行に切り替える。

ジョブをバックグラウンドの実行に切り替える
構文 : bg [コマンドのジョブ番号]

指定した番号のジョブをバックグラウンドで実行する。ジョブ番号を省略した場合はカレントジョブ(+の付いたジョブ)をバックグラウンドの実行に切り替える。例えば、"ssh"という文字列を検索しているジョブを探してバックグラウンドの実行に切り替える場合を以下に示します。

$ jobs
[1] - Stopped                 emacs text.txt
[2]   Stopped                 man ls
[3]   Stopped                 find / -name "ssh"
[4] + Stopped (signal)        w3c http://homepage2.nifty.com/~koji-hp/
$ bg 3
$ jobs
[1] - Stopped                 emacs text.txt
[2]   Stopped                 man ls
[3]   Running                 find / -name "ssh" &
[4] + Stopped (signal)        w3c http://homepage2.nifty.com/~koji-hp/

http://kank.o.oo7.jp/2016/linux/shell_008.html
初版:2002.06.30
更新:2013.7.2(リニューアル)
更新:2016.8.17(リニューアル)