What is the difference between a job and a process? job是shell的概念,process是操作系统的概念。从一定程度上讲,你可以理解为job里可以有多个process。 比如运行: $ tail -f test.txt | more & [1] 32751 $ jobs [1]+ Running tail -f test.txt | more $ ps af PID TTY STAT TIME COMMAND 32740 pts/1 Ss 0:00 -bash 32750 pts/1 T 0:00 \_ tail -f test.txt 32751 pts/1 T 0:00 \_ more 32752 pts/1 R+ 0:00 \_ ps af 762 tty2 Ss+ 0:00 /sbin/getty 38400 tty2 760 tty1 Ss+ 0:00 /sbin/getty 38400 console 可以看到只启动了一个job,但存在tail和more两个process。 你可以阅读一下Understanding Job Control In Bash
What is the difference between a job and a process?
job是shell的概念,process是操作系统的概念。从一定程度上讲,你可以理解为job里可以有多个process。
比如运行:
可以看到只启动了一个job,但存在
tail和more两个process。你可以阅读一下Understanding Job Control In Bash