bash判断进程存在的3种方法Linux认证考试

文章作者 100test 发表时间 2009:07:09 20:30:29
来源 100Test.Com百考试题网


  当前系统中的进程:
  apple@ubuntu:~$ ps -ef
  UID PID PPID C STIME TTY TIME CMD
  root 1 0 0 13:57 ? 00:00:02 /sbin/init
  root 2 0 0 13:57 ? 00:00:00 [kthreadd]
  root 3 2 0 13:57 ? 00:00:00 [migration/0]
  root 4 2 0 13:57 ? 00:00:00 [ksoftirqd/0]
  root 5 2 0 13:57 ? 00:00:00 [watchdog/0]
  root 6 2 0 13:57 ? 00:00:00 [migration/1]
  root 7 2 0 13:57 ? 00:00:00 [ksoftirqd/1]
  root 8 2 0 13:57 ? 00:00:00 [watchdog/1]
  root 9 2 0 13:57 ? 00:00:00 [events/0]
  root 10 2 0 13:57 ? 00:00:00 [events/1]
  root 11 2 0 13:57 ? 00:00:00 [khelper]
  root 12 2 0 13:57 ? 00:00:00 [kstop/0]
  root 13 2 0 13:57 ? 00:00:00 [kstop/1]
  root 14 2 0 13:57 ? 00:00:00 [kintegrityd/0]
  root 15 2 0 13:57 ? 00:00:00 [kintegrityd/1]
  root 16 2 0 13:57 ? 00:00:00 [kblockd/0]
  root 17 2 0 13:57 ? 00:00:00 [kblockd/1]
  root 18 2 0 13:57 ? 00:00:00 [kacpid]
  root 19 2 0 13:57 ? 00:00:00 [kacpi_notify]
  root 20 2 0 13:57 ? 00:00:00 [cqueue]
  root 21 2 0 13:57 ? 00:00:00 [ata/0]
  root 22 2 0 13:57 ? 00:00:00 [ata/1]
  root 23 2 0 13:57 ? 00:00:00 [ata_aux]
  root 24 2 0 13:57 ? 00:00:00 [ksuspend_usbd]
  root 25 2 0 13:57 ? 00:00:00 [khubd]
  root 26 2 0 13:57 ? 00:00:00 [kseriod]
  root 27 2 0 13:57 ? 00:00:00 [kmmcd]
  root 28 2 0 13:57 ? 00:00:00 [btaddconn]
  root 29 2 0 13:57 ? 00:00:00 [btdelconn]
  root 30 2 0 13:57 ? 00:00:00 [pdflush]
  root 31 2 0 13:57 ? 00:00:00 [pdflush]
  root 32 2 0 13:57 ? 00:00:00 [kswapd0]
  root 33 2 0 13:57 ? 00:00:00 [aio/0]
  root 34 2 0 13:57 ? 00:00:00 [aio/1]
  root 35 2 0 13:57 ? 00:00:00 [ecryptfs-kthrea]
  root 38 2 0 13:57 ? 00:00:00 [pciehpd]
  root 39 2 0 13:57 ? 00:00:00 [scsi_eh_0]
  root 40 2 0 13:57 ? 00:00:00 [scsi_eh_1]
  root 41 2 0 13:57 ? 00:00:00 [kstriped]
  root 42 2 0 13:57 ? 00:00:00 [kmpathd/0]
  root 43 2 0 13:57 ? 00:00:00 [kmpathd/1]
  root 44 2 0 13:57 ? 00:00:00 [kmpath_handlerd]
  root 45 2 0 13:57 ? 00:00:00 [ksnapd]
  root 46 2 0 13:57 ? 00:00:00 [kondemand/0]
  root 47 2 0 13:57 ? 00:00:00 [kondemand/1]
  root 48 2 0 13:57 ? 00:00:00 [krfcommd]
  root 256 2 0 13:57 ? 00:00:00 [mpt_poll_0]
  root 717 2 0 13:57 ? 00:00:00 [scsi_eh_2]
  root 753 2 0 13:57 ? 00:00:00 [kdmflush]
  root 764 2 0 13:57 ? 00:00:00 [kdmflush]
  root 795 2 0 13:57 ? 00:00:00 [kjournald]
  root 915 1 0 13:57 ? 00:00:00 /sbin/udevd --daemon
  root 1617 2 0 13:57 ? 00:00:00 [kpsmoused]
  root 2166 1 0 13:57 tty4 00:00:00 /sbin/getty 38400 tty4
  root 2167 1 0 13:57 tty5 00:00:00 /sbin/getty 38400 tty5
  root 2172 1 0 13:57 tty2 00:00:00 /sbin/getty 38400 tty2
  root 2173 1 0 13:57 tty3 00:00:00 /sbin/getty 38400 tty3
  root 2174 1 0 13:57 tty6 00:00:00 /sbin/getty 38400 tty6
  root 2244 1 0 13:57 ? 00:00:00 /usr/sbin/acpid -c /etc/acpi/eve
  root 2259 1 0 13:57 ? 00:00:00 /usr/sbin/syslog-ng -p /var/run/
  105 2279 1 0 13:57 ? 00:00:00 /bin/dbus-daemon --system
  root 2311 1 0 13:58 ? 00:00:00 /usr/sbin/incrond -f /etc/incron
  root 2381 1 0 13:58 ? 00:00:00 dhclient3 -e IF_METRIC=100 -pf /
  root 2442 1 0 13:58 ? 00:00:00 /usr/sbin/sshd

相关文章


Linux信号和阻塞Linux认证考试
linux_Unix各版本密码破解合辑Linux认证考试
linux认证辅导:_proc文件系统Linux认证考试
bash判断进程存在的3种方法Linux认证考试
Linux服务器的四种入侵级别Linux认证考试
linux下随机数字的生成Linux认证考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛