finger
? 显示当前登陆到系统中的用户的信息 ? 举例:
# finger
Login Name TTY Idle When Site I nfo
oracle ??? *l0 2:02 Mon 09:05 oracle ??? p4 1:59 Mon 09:05 root ??? p0 Mon 11:06 # finger oracle Login name: oracle
Directory: /usr/oracle/ora90 Shell: /usr/bin/ksh On since Sep 22 09:05:35 on lft0, 2 hours 2 minutes Idle Time (messages off)
On since Sep 22 09:05:41 on pts/4, 1 hour 59 minutes Idle Time from :0.0 No Plan. #
ps
? 功能:显示后台进程的有关信息。单独使用ps将显示由当前终端启动的后台进程的PID、
终端号、进程已执行时间以及启动该进程的命令 ? 语法:ps -options ? 参数说明:
-e :显示系统内当前运行的所有后台进程 -f :除ps所提供的信息外,还显示用户名、PPID(父进程ID)及启动时间 -l :除ps所提供的信息外,还显示 User ID, PPID 和进程优先级 例: # ps
PID TTY TIME CMD 803034 pts/0 0:00 -ksh 917524 pts/0 0:00 ps # ps -ef
UID PID PPID C STIME TTY TIME CMD root 1 0 0 09:03:04 - 0:00 /etc/init
root 90262 1 0 09:03:42 - 0:00 /usr/ccs/bin/shlap64
root 106572 139368 0 09:03:30 - 0:01 /usr/lpp/X11/bin/X -D /usr oracle 123030 155720 0 09:05:36 - 0:00 dtwm
root 139368 1 0 09:03:29 - 0:00 /usr/dt/bin/dtlogin -daemo oracle 155720 172088 0 09:05:35 - 0:00 /usr/dt/bin/dtsession
root 163946 245824 0 09:04:28 - 0:00 /usr/sbin/rsct/bin/rmcd -r
第 11 页 共 52 页
root 172088 139368 0 09:03:30 - 0:00 dtlogin <:0> -daemo oracle 180378 188526 0 09:06:20 pts/4 0:00 -ksh root 188526 483470 0 09:06:10 pts/4 0:00 -ksh
root 196670 303186 0 09:04:34 - 0:00 rpc.ttdbserver 100083 1 root 204866 245824 0 09:04:34 - 0:00 /usr/sbin/rsct/bin/IBM.Aud oracle 221370 581780 0 09:05:41 - 0:03 /usr/dt/bin/dtterm root 229440 1 0 09:03:41 - 0:01 /usr/sbin/syncd 60 root 237626 1 0 09:03:42 - 0:00 /usr/lib/errdemon root 245824 1 0 09:03:47 - 0:00 /usr/sbin/srcmstr root 262240 245824 0 09:03:50 - 0:00 /usr/sbin/syslogd
root 278642 245824 0 09:04:28 - 0:00 /usr/sbin/rsct/bin/ctcasd root 286806 245824 0 09:04:30 - 0:00 /usr/sbin/rsct/bin/IBM.CSM oracle 295050 1 0 09:07:03 - 0:00 ora_dbw0_ORCL root 303186 245824 0 09:03:59 - 0:00 /usr/sbin/inetd
root 311380 245824 0 09:03:53 - 0:00 sendmail: accepting connec root 319566 245824 0 09:03:56 - 0:00 /usr/sbin/portmap root 327760 245824 0 09:04:02 - 0:00 /usr/sbin/snmpd root 335954 245824 0 09:04:06 - 0:00 /usr/sbin/dpid2 root 344150 245824 0 09:04:09 - 0:00 /usr/sbin/hostmibd
oracle 368788 1 0 11:09:35 - 0:00 oracleORCL (LOCAL=NO) root 376946 1 0 09:04:18 - 0:00 /usr/sbin/cron root 385122 245824 0 09:04:12 - 0:00 /usr/sbin/biod 6 oracle 393320 1 0 09:07:03 - 0:00 ora_reco_ORCL daemon 401510 245824 0 09:04:15 - 0:00 /usr/sbin/rpc.statd
root 409726 1 0 09:04:28 - 0:00 /usr/bin/itesmdem itesrv.i root 417902 245824 0 09:04:18 - 0:00 /usr/sbin/rpc.lockd root 434288 1 0 09:04:25 - 0:00 /usr/sbin/uprintfd root 442484 245824 0 09:04:25 - 0:00 /usr/sbin/writesrv root 450676 245824 0 09:04:22 - 0:00 /usr/sbin/qdaemon
root 458874 245824 0 09:04:31 - 0:00 /usr/sbin/rsct/bin/IBM.Ser oracle 475266 1 0 09:05:35 - 0:00 /usr/dt/bin/ttsession -s oracle 483470 221370 0 09:05:41 pts/4 0:00 /usr/bin/ksh
oracle 491646 1 0 09:07:02 - 0:00 ora_pmon_ORCL
oracle 499860 1 0 09:07:33 pts/4 0:08 /usr/oracle/ora90/bin/tnsl oracle 524452 1 0 09:07:03 - 0:01 ora_ckpt_ORCL
root 532612 1 0 09:04:25 lft0 0:00 /usr/sbin/getty /dev/conso root 540830 245824 0 09:04:32 - 0:00 /usr/sbin/rsct/bin/IBM.ERr imnadm 557194 1 0 09:04:25 - 0:00 /usr/IMNSearch/httpdlite/h root 565388 1 0 09:04:25 - 0:00 /usr/lpp/diagnostics/bin/d oracle 573584 1 0 09:07:03 - 0:01 ora_smon_ORCL
oracle 581780 123030 0 09:05:41 - 0:00 /usr/dt/bin/dtexec -open 0 oracle 589978 1 0 09:07:03 - 0:00 ora_lgwr_ORCL
oracle 598188 1 0 09:17:14 - 0:00 oracleORCL (LOCAL=NO) oracle 606440 1 0 11:09:28 - 0:00 oracleORCL (LOCAL=NO)
第 12 页 共 52 页
oracle 622592 1 0 11:09:49 - 0:00 oracleORCL (LOCAL=NO) oracle 631032 1 0 11:09:34 - 0:00 oracleORCL (LOCAL=NO) oracle 638984 1 0 11:09:47 - 0:00 oracleORCL (LOCAL=NO) oracle 647404 1 0 10:58:31 - 0:01 oracleORCL (LOCAL=NO) oracle 655384 1 0 10:46:10 - 0:00 oracleORCL (LOCAL=NO) oracle 663756 1 0 11:09:38 - 0:00 oracleORCL (LOCAL=NO) oracle 671964 1 0 10:57:32 - 0:00 oracleORCL (LOCAL=NO) oracle 679998 1 0 11:09:32 - 0:00 oracleORCL (LOCAL=NO) oracle 688340 1 0 11:01:09 - 0:00 oracleORCL (LOCAL=NO) oracle 696500 1 oracle 704756 1 oracle 712916 1 oracle 721104 1 root 729308 803034 oracle 737532 1 oracle 753856 1 oracle 762104 1 oracle 770280 1 oracle 778466 1 oracle 786634 1 oracle 794656 1 root 803034 1056846 oracle 811034 1 oracle 819402 1 oracle 827620 1 oracle 835810 1 oracle 843988 1 oracle 852190 1 oracle 860378 1 oracle 868586 1 oracle 876796 1 oracle 884784 1 oracle 893164 1 oracle 909556 1 oracle 917528 1 oracle 925948 1 oracle 942326 1 oracle 950360 1 oracle 958486 1 oracle 974934 1 oracle 983294 1 oracle 999438 1 oracle 1007638 1 oracle 1015834 1 0 11:09:32 - 0:00 oracleORCL (LOCAL=NO) 0 11:09:32 - 0:00 oracleORCL (LOCAL=NO) 0 09:31:17 - 0:00 oracleORCL (LOCAL=NO) 0 09:33:58 - 0:00 oracleORCL (LOCAL=NO) 4 11:09:56 pts/0 0:00 ps -ef
0 11:07:43 - 0:00 oracleORCL (LOCAL=NO) 0 09:34:03 - 0:00 oracleORCL (LOCAL=NO) 1 11:09:53 - 0:00 oracleORCL (LOCAL=NO) 0 11:09:46 - 0:00 oracleORCL (LOCAL=NO) 0 11:04:42 - 0:00 oracleORCL (LOCAL=NO) 0 11:09:50 - 0:00 oracleORCL (LOCAL=NO) 0 11:08:10 - 0:00 oracleORCL (LOCAL=NO) 0 11:06:38 pts/0 0:00 -ksh
0 10:59:20 - 0:00 oracleORCL (LOCAL=NO) 0 09:47:03 - 0:00 oracleORCL (LOCAL=NO) 0 10:10:40 - 0:00 oracleORCL (LOCAL=NO) 0 10:57:30 - 0:00 oracleORCL (LOCAL=NO) 0 09:49:16 - 0:00 oracleORCL (LOCAL=NO) 0 10:52:22 - 0:00 oracleORCL (LOCAL=NO) 0 09:33:55 - 0:00 oracleORCL (LOCAL=NO) 0 10:52:21 - 0:00 oracleORCL (LOCAL=NO) 0 11:09:29 - 0:00 oracleORCL (LOCAL=NO) 0 10:59:22 - 0:00 oracleORCL (LOCAL=NO) 0 10:42:26 - 0:00 oracleORCL (LOCAL=NO) 0 11:09:49 - 0:00 oracleORCL (LOCAL=NO) 1 11:09:53 - 0:00 oracleORCL (LOCAL=NO) 0 11:09:47 - 0:00 oracleORCL (LOCAL=NO) 0 11:07:47 - 0:00 oracleORCL (LOCAL=NO) 0 11:07:35 - 0:00 oracleORCL (LOCAL=NO) 0 11:09:39 - 0:00 oracleORCL (LOCAL=NO) 0 11:07:23 - 0:00 oracleORCL (LOCAL=NO) 0 10:48:40 - 0:00 oracleORCL (LOCAL=NO) 0 10:58:51 - 0:00 oracleORCL (LOCAL=NO) 0 10:52:27 - 0:00 oracleORCL (LOCAL=NO) 0 11:08:09 - 0:00 oracleORCL (LOCAL=NO)
第 13 页 共 52 页
oracle 1024012 1 0 09:45:28 - 0:00 oracleORCL (LOCAL=NO) oracle 1032230 155720 0 11:08:33 - 0:00 /usr/dt/bin/dtexec -open 0 oracle 1040390 1 0 10:58:52 - 0:00 oracleORCL (LOCAL=NO) root 1056846 303186 0 11:06:38 - 0:00 telnetd -a
oracle 1064970 1 0 10:05:40 - 0:00 oracleORCL (LOCAL=NO) oracle 1081404 1 0 11:09:31 - 0:00 oracleORCL (LOCAL=NO) oracle 1089562 1 0 11:09:32 - 0:00 oracleORCL (LOCAL=NO) oracle 1097770 1 1 11:09:53 - 0:00 oracleORCL (LOCAL=NO) oracle 1105962 1 0 11:09:32 - 0:00 oracleORCL (LOCAL=NO) oracle 1114198 1 0 11:07:47 - 0:00 oracleORCL (LOCAL=NO) oracle 1122406 1 0 11:07:00 - 0:00 oracleORCL (LOCAL=NO) oracle 1130564 1 0 10:27:48 - 0:00 oracleORCL (LOCAL=NO) oracle 1138778 1 0 10:57:28 - 0:00 oracleORCL (LOCAL=NO) oracle 1146948 1 0 11:07:26 - 0:00 oracleORCL (LOCAL=NO) oracle 1155106 1032230 0 11:08:33 - 0:00 /usr/dt/bin/dtscreen
oracle 1163312 1 0 11:09:39 - 0:00 oracleORCL (LOCAL=NO) oracle 1171526 1 0 11:00:39 - 0:01 oracleORCL (LOCAL=NO) oracle 1179700 1 0 10:53:31 - 0:00 oracleORCL (LOCAL=NO) oracle 1196136 1 0 11:09:32 - 0:00 oracleORCL (LOCAL=NO) oracle 1204300 1 0 10:58:52 - 0:00 oracleORCL (LOCAL=NO) oracle 1212516 1 0 10:54:08 - 0:00 oracleORCL (LOCAL=NO) oracle 1220718 1 0 10:42:22 - 0:00 oracleORCL (LOCAL=NO) oracle 1237084 1 0 10:42:20 - 0:00 oracleORCL (LOCAL=NO) oracle 1245250 1 0 11:09:33 - 0:00 oracleORCL (LOCAL=NO) oracle 1253470 1 0 11:08:09 - 0:00 oracleORCL (LOCAL=NO) oracle 1261658 1 0 11:09:32 - 0:00 oracleORCL (LOCAL=NO) oracle 1269822 1 0 10:28:05 - 0:10 oracleORCL (LOCAL=NO) oracle 1294398 1 0 10:46:13 - 0:00 oracleORCL (LOCAL=NO) oracle 1302590 1 0 10:46:08 - 0:00 oracleORCL (LOCAL=NO) oracle 1310814 1 0 11:09:34 - 0:00 oracleORCL (LOCAL=NO) oracle 1318996 1 0 11:04:45 - 0:00 oracleORCL (LOCAL=NO) oracle 1335400 1 0 11:09:47 - 0:00 oracleORCL (LOCAL=NO) oracle 1343576 1 0 11:09:39 - 0:00 oracleORCL (LOCAL=NO) oracle 1351830 1 0 11:09:31 - 0:00 oracleORCL (LOCAL=NO) oracle 1368176 1 0 11:09:32 - 0:00 oracleORCL (LOCAL=NO) # # ps -l
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
240001 A 0 803034 1056846 1 60 20 20009284 952 pts/0 0:00 k
sh
200001 A 0 1114200 803034 1 60 20 2003549a 488 pts/0 0:00 p
第 14 页 共 52 页
s #
kill
? 功能:杀死后台进程 ? 语法:kill -num PID ? 举例:
kill –9 23094 (-9 是软件终止进程的信号,是不可忽略的)
find
? 功能:在一个或多个目录中查找符合指定条件的文件,显示文件名或对这些文件进行特
定的操作
? 语法:find path expression ? 参数说明: -type -size -mtime -perm -user -o f d +n -n n +x -x onum mode User 文件 目录 文件大小超过n blocks(1block=512 bytes) 文件大小小于n blocks 文件大小等于n blocks X天以前被修改的文件 X天以内被修改的文件 访问指定权限的文件(权限以8进制表示) 访问指定权限的文件(权限以字母表示,如rwx) 属于用户user的文件 逻辑‘或’
? 举例:
1. find . –name ?unix? –print
在当前目录及其子目录中查找文件名为“m*”的所有文件(‘*’是通配符)并显示文件名。
# find . -name \./usr/lib/boot/unix
./usr/oracle/ora90/inventory/filemap/md/demo/unix
./usr/oracle/ora90/inventory/filemap/ultrasearch/tools/remotecrawler/scripts/uni x
./usr/oracle/ora90/md/demo/unix
./usr/oracle/ora90/ultrasearch/tools/remotecrawler/scripts/unix
./upload/Disk2/stage/Components/oracle.sysman.website.nls/9.2.0.1.0/1/DataFiles/ Expanded/websitehtm/unix ./unix #
第 15 页 共 52 页