是否有可能运行终端程序,并将它继续运行在关闭终端后? [英] Is it possible to run a program from terminal and have it continue to run after you close the terminal?
问题描述
我已经写了,我连接到箱子通过SSH后运行的程序。它有一些用户交互,如选择在收到提示后选择,通常我等待的过程它执行注销其关闭终端并结束程序之前完成。但是,现在这个过程是相当漫长的,我不想等待,同时被记录在,所以我怎么可能实现℃,这一种解决方法吗?
I have written a program which I run after connecting to the box over SSH. It has some user interaction such as selecting options after being prompted, and usually I wait for the processes it carries out to finish before logging out which closes the terminal and ends the program. But now the process is quite lengthy and I don't want to wait whilst being logged in, so how could I implement a workaround for this in C please?
推荐答案
您可以通过以下用命令在后台运行的程序&放大器;
You can run a program in the background by following the command with "&"
的wget -m www.google.com和放大器;
wget -m www.google.com &
或者,您可以使用屏幕计划,允许你附加-deattach会议
Or, you could use the "screen" program, that allows you to attach-deattach sessions
屏幕的wget -m www.google.com
screen wget -m www.google.com
($ P $干燥综合征CTRL + D)
(PRESS CTRL+D)
屏幕-r(下重新连接)
screen -r (TO RE ATTACH)
http://linux.die.net/man/1/screen
这篇关于是否有可能运行终端程序,并将它继续运行在关闭终端后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!