Bash/Misc/Detach: Unterschied zwischen den Versionen

Aus SchnallIchNet
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: ==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' # ...)
 
Zeile 1: Zeile 1:
 
==Method 1==
 
==Method 1==
- start the process from the konsole
+
# start the process from the konsole<br/>
- put it the background with Ctrl-Z and 'bg 1'
+
# put it the background with Ctrl-Z and 'bg 1'<br/>
- tell the shell to detach the process with the command 'disown -a'
+
# tell the shell to detach the process with the command 'disown -a'<br/>
 
  # /path/to/command -opt1 -opt2 X --opt3=bla
 
  # /path/to/command -opt1 -opt2 X --opt3=bla
 
  CTRL-Z
 
  CTRL-Z
Zeile 8: Zeile 8:
  
 
==Method 2==
 
==Method 2==
- start the process with nohup (ie. write the command 'nohup processname' instead of 'processname'. See 'man nohup' for an explanation.
+
# 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
 
  nohup /path/to/command -opt1 -opt2 X --opt3=bla
  
 
==Method 3==
 
==Method 3==
- pipe the commant to at
+
# pipe the commant to at
 
  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. Dezember 2009, 09:55 Uhr

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

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 commant to at
echo "/path/to/command -opt1 -opt2 X --opt3=bla" | at now