Please tell me the differences in information displayed by two commands jobs and ps in unix operating system?
It can give you information that is internal to the shell, like the job numbers (which you can use in shortcuts like fg %2 ) and the original command line as it appeared before variable expansions. ps is an external command which can tell you about all the processes running on the system.
Answer: A process refers to a program under execution. This program may be an application or system program. Job means an application program and it is not a system program.
In Linux, a job is a process that the shell is managing and hasn't finished running. Every job has a unique ID that you can use to control it regardless of whether it is in the background or foreground of your terminal session. By using the jobs utility, you can retrieve a list of all currently running jobs.
top enables you to see your processes ordered by the amount of processor power they use. ps enables you to see all your processes, or just the processes used by certain users, for example root or yourself.
jobs
is a shell builtin. It tells you about the jobs that the current shell is managing. It can give you information that is internal to the shell, like the job numbers (which you can use in shortcuts like fg %2
) and the original command line as it appeared before variable expansions.
ps
is an external command which can tell you about all the processes running on the system. (By default it only shows a small subset, but there are options to select larger sets of processes to display.) It doesn't know about the shell-internal stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With