Linux System Programming Techniques by Jack-Benny Persson

Linux System Programming Techniques by Jack-Benny Persson

Author:Jack-Benny Persson [Jack-Benny Persson]
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2021-04-30T00:00:00+00:00


Now, we can continue running the program in the background using the bg command (bg stands for background):$> bg 1

[1]+ sleep 300 &

$> jobs

[1]+ Running sleep 300 &

We can also find the PID of the program by using a command called pgrep. The name pgrep stands for Process Grep. The -f option lets us specify the complete command, including its options, so that we get the correct PID:$> pgrep -f "sleep 300"

4822

Now that we know the PID, we can kill the program using kill:$> kill 4822

$> Enter

[1]+ Terminated sleep 300



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.