psall
来自「伯克利做的SFTP安全文件传输协议」· 代码 · 共 38 行
TXT
38 行
#! /bin/csh -f# script to produce a list of all processes, with usernames# in column 1, process ids in column 2, and executable# names anywhere else on the line# for some OSes, I know how to do itswitch ($OSTYPE)case "linux": ps -aux exitcase "hp-ux": ps -ef exitendsw# try to figure out how to get a list of all processes# try /bin/ps -ef, which I at one point thought worked on# all systems, and is normal BSD methodset out = `/bin/ps -ef | head -1`if ( "${out[1]}" == "USER" && "${out[2]}" == "PID" ) then /bin/ps -ef exitendif# try ps -aux, which works on (all?) System Vset out = `ps -aux | head -1`if ( "${out[1]}" == "USER" && "${out[2]}" == "PID" ) then ps -aux exitendif# give upecho "error: I couldn't figure out how to get a process list."exit 2
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?