通过kill命令,来看man手册是如何书写

1.信号

 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL
 5) SIGTRAP      6) SIGABRT      7) SIGBUS       8) SIGFPE
 9) SIGKILL     10) SIGUSR1     11) SIGSEGV     12) SIGUSR2
13) SIGPIPE     14) SIGALRM     15) SIGTERM     16) SIGSTKFLT
17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU
25) SIGXFSZ     26) SIGVTALRM   27) SIGPROF     28) SIGWINCH
29) SIGIO       30) SIGPWR      31) SIGSYS      34) SIGRTMIN
35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3  38) SIGRTMIN+4
39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12
47) SIGRTMIN+13 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14
51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10
55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7  58) SIGRTMAX-6
59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX
kill  命令详解   
    kill [-signal|-s signal|-p] [-q value] [-a] [--timeout milliseconds
       signal] [--] pid|name...
       kill -l [number] | -L
       -s, --signal signal
              The signal to send.  It may be given as a name or a number.

       -l, --list [number]
              Print a list of signal names, or convert the given signal
              number to a name.  The signals can be found in /usr/include/
              linux/signal.h

       -L, --table
              Similar to -l, but it will print signal names and their
              corresponding numbers.

       -a, --all
              Do not restrict the command-name-to-PID conversion to
              processes with the same UID as the present process.

       -p, --pid
              Only print the process ID (PID) of the named processes, do not
              send any signals.

       --verbose
              Print PID(s) that will be signaled with kill along with the
              signal.

       -q, --queue value
              Use sigqueue(3) rather than kill(2).  The value argument is an
              integer that is sent along with the signal.  If the receiving
              process has installed a handler for this signal using the
              SA_SIGINFO flag to sigaction(2), then it can obtain this data
              via the si_sigval field of the siginfo_t structure.

       --timeout milliseconds signal
              Send a signal defined the usual way to a process.  --timeout
              will make kill to wait for a period defined in milliseconds
              before sending follow-up signal to process.  This feature is
              implemented by PID file-descriptor and guaranties that follow-
              up signals are sent to the same process or not sent if the
              process no more exist.  Note that the operating system may re-
              use PIDs and implement the same feature in a shell by kill and
              sleep commands sequence may introduce a race.  This option can
              be specified more than once than signals are sent sequentially
              in defined timeouts.  The --timeout option can be combined
              with --queue option

 

 

1.options 也可以有自己的参数。

可称为arguments(注意,选项与选项之间,选项与参数之间,参数与参数之间必须有空格;有的长选项和参数间用=连接)且,命令的选项和参数所使用的符号有特殊含义,这类常见符号有 [ ]、  { }、 ... , 粗体或下划线字体等也有特殊含义:
  1. | (竖线)字符分开的两个或多个项,表示可以从列表中选择某一项;例如;[-signal|-s signal|-p]
  2.如果一个单独的选项和一个参数组合在一起,则它们必须同时使用; [-q value]

  3. xx后接省略号(…)的选项或参数可以有多个;pid|name...

  4. 斜体字根据实际需要替换(不显示斜体字的系统上通常用下划线代替)例如:signal,value,name。

  5.黑体(呃...)字必须按原样准确输入,这一类可能是命令名或特殊标记; 例如:kill

  6. 不在方括号或是在大括号中的项是必选项;  pid|name...和kill 

  7.方括号中的项是可选的;

 

2.options:命令选项有两种形式:长选项(--)和短选项(-)


1.长选项: 用 -- 引导,后面跟完整的单词,eg:  --verbose 
2.短选项: 用 - 引导,后面跟单个的字符, eg:   -e -l -f == -elf 

但是长选项不能组合使用,如 --verbose后面就不能直接再跟另外一个(选项)单词或字符了。

但是可以这样

 kill --verbose --timeout 1000 TERM --timeout 1000 KILL
              --signal QUIT 12345

 

再例如:

alias [alias-name[=string]...]

 

他就可以不添加任何的选项。。。是不是符合了上面的9条猜想

这里唯一的一个疑惑就是[--]。。。待日后来看看了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值