Linux Commands#System

Ctrl + Z - How to use Ctrl + Z



Move Running Process to Background

[user01@test-server1 ~]$
[user01@test-server1 ~]$ /bin/sh /home/user01/scripts/mail_backup.sh
20161223_manual.tar.gz                                                              8%  614MB 123.3KB/s 15:13:28 ET
[1]+  Stopped                 /bin/sh /home/user01/scripts/mail_backup.sh               <-  Ctrl + Z
[user01@test-server1 ~]$
[user01@test-server1 ~]$
[user01@test-server1 ~]$ jobs
[1]+  Stopped                 /bin/sh /home/user01/scripts/mail_backup.sh
[user01@test-server1 ~]$ bg
[1]+ /bin/sh /home/user01/scripts/mail_backup.sh &
[user01@test-server1 ~]$
[user01@test-server1 ~]$
[user01@test-server1 ~]$ ps -ef |grep mail
user01    11426 11337  0 12:31 pts/0    00:00:00 /bin/sh /home/user01/scripts/mail_backup.sh
user01    11816 11337  0 14:15 pts/0    00:00:00 grep mail
[user01@test-server1 ~]$
[user01@test-server1 ~]$
[user01@test-server1 ~]$
[user01@test-server1 ~]$ jobs
[1]+  Running                 /bin/sh /home/user01/scripts/mail_backup.sh &
[user01@test-server1 ~]$
[user01@test-server1 ~]$
[user01@test-server1 ~]$ disown %1
[user01@test-server1 ~]$
[user01@test-server1 ~]$
[user01@test-server1 ~]$ jobs
[user01@test-server1 ~]$
[user01@test-server1 ~]$
[user01@test-server1 ~]$ ps -ef |grep mail
user01    11426 11337  0 12:31 pts/0    00:00:00 /bin/sh /home/user01/scripts/mail_backup.sh
user01    11848 11337  0 14:24 pts/0    00:00:00 grep mail
[user01@test-server1 ~]$
[user01@test-server1 ~]$





Linux Commands#System