让程序在后台运行的几个简单方法

screen

screen cvs up

然后直接退出终端即可。如果登录还想看看执行情况可以使用

screen -R

nohup

nohup cvs up

程序的标准输出会被定向到一个叫nohup.out的文件去

disown

用于已经在运行的程序,先通过CTRL+Z暂停程序然后用bg命令把程序放到后台执行。最后用disown命令让程序与shell脱离关系,这样退出shell后程序还能继续运行。

No votes yet

发表新评论

此内容将保密,不会被其他人看见。 If you have a Gravatar account, used to display your avatar.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.