English 中文(简体)
我如何在不使用信条的情况下连续地掌握一个不完美的文字。
原标题:how can I continously run a unix script in background without using crontab.

我如何在不使用信条的情况下继续使用文字。 文字甚至在我投稿之后就应当使用,如果在系统复贴后开标,则可以接受。 我是新到的。

问题回答

这样做有多种方法,但检验方式是使用rel=“nofollow” 。 这使你能够开出一个会议,在机器上生活得很满,你只能重新接通,检查你长期工作的进展。

如果您不希望使用<条码> 屏幕。 页: 1 这使你能够执行以下任务:

<0>0>0> mytask &

你的任务现在将处于背景之中,并将在 log子下生存,然而,与<条码><<>>>条/代码”不同的是,无法再次控制。

if [ "x$1" != "x--" ]; then
$0 -- 1> /dev/null 2> /dev/null &
exit 0
fi

This is how you can run a script as a daemon. First your script (the father) will create a copy of himself (a child) so it is considerd as a process of the father. Then the father kills itself while the child is still running. Guess what happens when you do such a thing ? The child is attached to the init process. So even if you logout, the script will still run. You can even start it without the "&" operator because you start the father which is killed a millisecond after.
You can take control over it again like any program running on your computer.

这不是真正的“da”方案,它只是一种ulation。 如果你想在座标上开始,那么你就可以在座标上就开始(实际上,我指的是BOOT,而不是原木),简单地把它放在你的<代码>上。

这一解决办法的主要好处是,你的文字并不取决于任何其他方案,如“无”方案,而我认为这种方案确实是坏的。

Regards
PS : If you want some informations about what the command above does, just ask me. It s just a "parameter" thing.

正如其他人前面提到的那样,你需要用电灯来防止这一进程获得悬).信号。

然而,如果你开始这一进程,就象现在这样。

prompt> nohup process &

that has the disadvantage of not allowing you to enter any data that may be required to get the process started off. This may be passwords/credentials or other input the process needs.

如果你有这一要求,那么,最终就在没有“和”的情况下开始,就进入你的意见,然后打Ctrl-Z,使这一过程睡觉。 将其送往背景、迅速进入的“bg”类。

prompt> nohup process
Enter password:
(Now press Ctrl-Z)
[1]+  Stopped                 process
prompt> bg
[1]+ process &

现在,即使你退步,这一进程将继续处于背景之下。

或者,如果你不开始这一进程,就开始这一进程,而杀戮和重新启动,这并不是一种选择,那么你可以使用内部的自行指挥。 这一进程首先停顿,背景也不相同。 之后,从到达时就停止hang升信号。

prompt> process
Enter password:
(Now press Ctrl-Z)
[1]+  Stopped                 process
prompt> bg
[1]+ process &
prompt> disown -h

说明:如果你从事其他背景工作,那么你需要提供只放弃这一具体工作的岗位。

prompt> disown -h %1

如果在你停职和将程序送至其背景时,你不认为有 *** ,而是说:<条码>分立——h %2<>。

如上所述,除了从此开始,你可能需要使用 no。 这意味着它将继续运行,即使你关闭终点站。

Nohup /abc.sh &

开始使用和安装的背景; 经营者,例如

./abc.sh & this will continue till (a) the execution is complete or (b) you kill it or (c) system reboots





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签