夏钺的博客

一条咸鱼

jobs指令man手册内容

  jobs [-lnprs] [ jobspec ... ]
   jobs -x command [ args ... ]
          The first form lists the active jobs.  The options have the following meanings:
          -l     List process IDs in addition to the normal information.
          -p     List only the process ID of the job’s process group leader.
          -n     Display information only about jobs that have changed status since the user was last notified of their status.
          -r     Restrict output to running jobs.
          -s     Restrict output to stopped jobs.

          If jobspec is given, output is restricted to information about that job.  The return status is 0 unless an invalid option is encountered or an invalid jobspec is supplied.

          If the -x option is supplied, jobs replaces any jobspec found in command or args with the corresponding process group ID, and executes command passing it args, returning its exit status.

   kill [-s sigspec | -n signum | -sigspec] [pid | jobspec] ...
   kill -l [sigspec | exit_status]
          Send the signal named by sigspec or signum to the processes named by pid or jobspec.  sigspec is either a case-insensitive signal name such as SIGKILL (with or without the SIG prefix) or a signal num-
          ber; signum is a signal number.  If sigspec is not present, then SIGTERM is assumed.  An argument of -l lists the signal names.  If any arguments are supplied when -l is given, the names of  the  sig-
          nals  corresponding to the arguments are listed, and the return status is 0.  The exit_status argument to -l is a number specifying either a signal number or the exit status of a process terminated by
          a signal.  kill returns true if at least one signal was successfully sent, or false if an error occurs or an invalid option is encountered.
posted @ 2020-11-15 14:33  Applied_Energetic  阅读(101)  评论(0编辑  收藏  举报