脚本在后台的知识的命令 & 把脚本放在后台运行 会一直运行下去 [root@localhost day9]# jobs 【查看这在运行的后台程序】 [1]+ Running sh while01.sh & [root@localhost day9]# fg 1【拿到前台来执行了 这种情况下一但网络断了,就不会再执行了】 sh while01.sh 暂停他按ctrl 暂停他按ctrl +z [1]+ Stopped sh while01.sh [root@localhost day9]# jobs [1]+ Stopped sh while01.sh [root@localhost day9]# bg 1 【再放在后台运行】 [1]+ sh while01.sh & [root@localhost day9]# jobs [1]+ Running sh while01.sh &