Repost: Several skills of Linux task control

zhaozj2021-02-16  78

Original: http://www.freeelamp.com/new/publish/1004149643/index_html

Linux / UNIX distinguishes the biggest advantage of Microsoft platform is true multi-user, multitasking. Therefore, there is also a unique management idea on task management. We know, in Windows, we either let a program run in the background in the background, or stop this service. Instead of switching between the front desk background. Linux provides the FG and BG commands to make you easily schedule the tasks being running. Suppose you find a program that runs at the front desk takes a long time, but you need to do other things, you can use Ctrl-Z, terminate this program, then you can see the system prompt: [1] stopped / root / bin / Rsync.sh then we can schedule the program to the background: (The number behind BG is the job number) #bg 1 [1] /Root/bin/rsync.sh & with the jobs command to view the running task: #JOBS [ 1] Running /Root/bin/rsync.sh & If you want to transfer it to the front desk, you can use #fg 1 / root / bin / rsync.sh, you can only wait for this task on the console. .

转载请注明原文地址:https://www.9cbs.com/read-15832.html

New Post(0)