Use the jobs command in linux to display job information for shell
Editor to share with you the use of linux jobs command to display shell homework information, I hope you will learn a lot after reading this article, let's discuss it together!
The jobs command is mainly used to display the list of tasks in the system and their running status.
This command can display the task number and its corresponding process number, where the task number is carried out from the point of view of the ordinary user, and the process number is viewed from the point of view of the system administrator. A task can correspond to one or more process numbers.
Syntax format: jobs [parameters] [directory]
Common parameters:
-l display job list including process number-n displays jobs whose status has changed since the last use of jobs-p displays only their corresponding process number when displaying job list-r shows only running (running) jobs-s shows only paused (stopped) jobs
Reference example
Displays a list of current jobs:
[root@linuxcool ~] # jobs
Displays the current job number and the corresponding process number:
[root@linuxcool ~] # jobs-l
Only running jobs are displayed:
[root@linuxcool ~] # jobs-r
Only paused jobs are displayed:
[root@linuxcool] # jobs-s
Displays jobs whose status has changed since the last time you used jobs:
[root@linuxcool] # jobs-n after reading this article, I believe you have a certain understanding of using the jobs command in linux to display shell operation information. Want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!