pid,ppid,pgid,sid,tpgid,tty,pipeline,&

  • Post author:
  • Post category:其他


> echo $SHELL

/bin/bash

> echo $$


4834

> ps -o pid,ppid,pgid,sid,tpgid,tty,comm

PID  PPID  PGID   SID TPGID TT       COMMAND

4834  4827

4834

4834 18504 pts/3    bash

18504  4834

18504

4834

18504

pts/3    ps

> ps -o pid,ppid,pgid,sid,tpgid,tty,comm &

[1] 18871

>

PID  PPID  PGID   SID TPGID TT       COMMAND

4834  4827

4834

4834

4834

pts/3    bash

18871  4834

18871

4834  4834 pts/3    ps

[1]+  Done                    ps -o pid,ppid,pgid,sid,tpgid,tty,comm

> ps -o pid,ppid,pgid,sid,tpgid,tty,comm | cat

PID  PPID  PGID   SID TPGID TT       COMMAND

4834  4827

4834

4834 18887 pts/3    bash

18887  4834

18887

4834

18887

pts/3    ps

18888  4834

18887

4834

18887

pts/3    cat

> ps -o pid,ppid,pgid,sid,tpgid,tty,comm | cat &

[1] 18891

>

PID  PPID  PGID   SID TPGID TT       COMMAND

4834  4827

4834

4834

4834

pts/3    bash

18890  4834

18890

4834  4834 pts/3    ps

18891  4834

18890

4834  4834 pts/3    cat

[1]+  Done                    ps -o pid,ppid,pgid,sid,tpgid,tty,comm | cat

> ps -o pid,ppid,pgid,sid,tpgid,tty,comm | cat | tee

PID  PPID  PGID   SID TPGID TT       COMMAND

4834  4827  4834  4834 28434 pts/3    bash

28434  4834

28434

4834

28434

pts/3    ps

28435  4834

28434

4834

28434

pts/3    cat

28436  4834

28434

4834

28434

pts/3    tee

> ps -o pid,ppid,pgid,sid,tpgid,tty,comm | cat | tee &

[1] 28447

>

PID  PPID  PGID   SID TPGID TT       COMMAND

4834  4827

4834

4834

4834

pts/3    bash

28445  4834

28445

4834  4834 pts/3    ps

28446  4834

28445

4834  4834 pts/3    cat

28447  4834

28445

4834  4834 pts/3    tee

[1]+  Done                    ps -o pid,ppid,pgid,sid,tpgid,tty,comm | cat | tee

> echo $SHELL

/bin/bash

> echo $$


6183

> ps -o pid,ppid,pgid,sid,tpgid,tty,comm

PID  PPID  PGID   SID TPGID TT       COMMAND

6183  6179  6183  6183  7358 pts/7    bash


7358

6183  7358  6183  7358 pts/7    ps

> (ps -o pid,ppid,pgid,sid,tpgid,tty,comm)

PID  PPID  PGID   SID TPGID TT       COMMAND

6183  6179  6183  6183  7385 pts/7    bash


7385

6183  7385  6183  7385 pts/7    ps

> { ps -o pid,ppid,pgid,sid,tpgid,tty,comm; }

PID  PPID  PGID   SID TPGID TT       COMMAND

6183  6179  6183  6183  7388 pts/7    bash


7388

6183  7388  6183  7388 pts/7    ps