Linux命令查询

Top
wait
  • 等待程序返回状态
  • wait[程序]
  • wait 命令:用来等待指定程序返回状态
    • 命令属性
  • 系统管理
    • 命令属权限
  • 超级用户 普通用户
  • ps  top  

  • 必要参数




    选择参数



  • hnlinux@snail-hnlinux:/root$ ps -A //显示所有进程
     PID TTY     TIME CMD
      1 ?    00:00:02 init
      2 ?    00:00:00 kthreadd
      3 ?    00:00:00 migration/0
      4 ?    00:00:00 ksoftirqd/0
      5 ?    00:00:00 watchdog/0
      6 ?    00:00:00 events/0
      7 ?    00:00:00 cpuset
      8 ?    00:00:00 khelper
    ……忽略部分结果
    1867 ?    00:00:00 smbd
    1875 ?    00:00:01 nmbd
    1876 ?    00:00:00 smbd
    2095 ?    00:00:00 sshd
    14454 ?    00:00:00 portmap
    14678 ?    00:00:00 rpc.statd
    14927 ?    00:00:00 rpciod/0
    14936 ?    00:00:00 lockd
    14937 ?    00:00:00 nfsd4
    14938 ?    00:00:04 nfsd
    14939 ?    00:00:02 nfsd
    14940 ?    00:00:02 nfsd
    14941 ?    00:00:07 nfsd
    14942 ?    00:00:03 nfsd
    14943 ?    00:00:04 nfsd
    14944 ?    00:00:02 nfsd
    14945 ?    00:00:01 nfsd
    14949 ?    00:00:00 rpc.mountd
    27718 ?    00:00:00 loop0
    27892 ?    00:00:01 flush-8:0
    28382 ?    00:00:00 gvfsd-http
    28391 ?    00:07:23 software-center
    30467 ?    00:00:28 designer-qt4
    30487 ?    00:00:05 gnome-terminal
    30488 ?    00:00:00 gnome-pty-helpe
    30489 pts/0  00:00:00 bash
    30670 ?    00:00:00 debconf-communi
    30749 pts/0  00:00:15 gedit
    30886 ?    00:01:10 qtcreator.bin
    30894 ?    00:00:00 qtcreator.bin
    31118 ?    00:00:01 gnome-display-p
    31156 ?    00:00:00 dhclient
    31594 ?    00:00:00 sshd
    31665 pts/1  00:00:00 bash
    31789 pts/1  00:00:00 su
    31796 pts/1  00:00:00 bash
    31823 ?    00:00:00 sshd
    31895 pts/2  00:00:00 bash
    hnlinux@snail-hnlinux:/root$ wait 31594 //等待程序返回状态