Bash/Misc/Detach

Aus SchnallIchNet
Wechseln zu: Navigation, Suche

Method 1

  1. start the process from the konsole
  2. put it the background with Ctrl-Z and 'bg 1'
  3. 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

  1. 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

  1. pipe the command to at
Achtung.jpeg '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

Method 4

use screen see: Screen