Bash/Misc/Detach: Unterschied zwischen den Versionen
Aus SchnallIchNet
< Bash
Cbs (Diskussion | Beiträge) (→Method 1) |
Cbs (Diskussion | Beiträge) |
||
Zeile 14: | Zeile 14: | ||
==Method 3== | ==Method 3== | ||
# pipe the commant to at | # pipe the commant to at | ||
+ | {{Achtung|'at' does NOT respect binfmt<br/>So if you specified e.g. '.php'-file-extension to be processed by<br/>your php-interpreter, you will have to write: <br/>'/path/to/php /path/to/command.php -opt1 ...'}} | ||
echo "/path/to/command -opt1 -opt2 X --opt3=bla" | at now | echo "/path/to/command -opt1 -opt2 X --opt3=bla" | at now |
Version vom 11. Januar 2010, 08:55 Uhr
Method 1
- start the process from the konsole
- put it the background with Ctrl-Z and 'bg 1'
- tell the shell to detach the process with the command 'disown -a'
# /path/to/command -opt1 -opt2 X --opt3=bla CTRL-Z # bg # disown -a
Method 2
- start the process with nohup (ie. write the command 'nohup processname' instead of 'processname'. See 'man nohup' for an explanation.
nohup /path/to/command -opt1 -opt2 X --opt3=bla
Method 3
- pipe the commant to at
'at' does NOT respect binfmt So if you specified e.g. '.php'-file-extension to be processed by your php-interpreter, you will have to write: '/path/to/php /path/to/command.php -opt1 ...' |
echo "/path/to/command -opt1 -opt2 X --opt3=bla" | at now