All commands listed below:
jobs- shows all current processes.bg%jobid - continue job in background.fg%jobid - bring background process into foreground.ctrl+z- in terminal shown as^Z; pauses current process and moves it to background.disown%jobid - removes the process from table of active processes.
cp extremelargefile ../ &.[1] + suspended (tty input) cp extremelargefile ../ &.When the process suspended and you wan't to continue it in foreground, on terminal, you might type
fg %jobid. To figure out the jobid you might type jobs. All current gets listed then.A process is running, e.g. cp. There might be a situation that you copy a large file and forgot to add & to the command. So you're running the process in foreground. To suspend the process and bring it to background you might press
ctrl+z. When you wan't the process to ran further, type bg %jobid. As already told, you can bring this process back to the front by typing fg %jobid.For example:
> cp extremelargefile ../ ^Z zsh: suspended cp extermelargefile ../ > jobs [1] - suspended (tty output) cp extremelargefile ../ > bg %1 [1] - continued (tty output) cp extremelargefile ../ > fg %1 [1] + continued (tty output) cp extremelargefile ../
Keine Kommentare:
Kommentar veröffentlichen