Linux Command - lsof
Linux Command - lsof
HOT TO TEST - lsof 1. --help
root@localhost:/root> lsof -h lsof 4.78 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhlnNoOPRstUvVX] [ |-c c] [ |-d s] [ D D] [ |-f] [-F [f]] [-g [s]] [-i [i]] [ |-L [l]] [ m [m]] [ |-M] [-o [o]] [-p s] [ |-r [t]] [-S [t]] [-T [t]] [-u s] [ |-w] [-x [fl]] [-Z [Z]] [--] [names] Defaults in parentheses; comma-separated set (s) items; dash-separated ranges. -?|-h list help -a AND selections (OR) -b avoid kernel blocks -c c cmd c, /c/[bix] c w COMMAND width (9) d s dir s files -d s select by FD set D D dir D tree *SLOW?* -i select IPv[46] files -l list UID numbers -n no host names -N select NFS files -o list file offset -O avoid overhead *RISK -P no port names -R list paRent PID -s list file size -t terse listing -T disable TCP/TPI info -U select Unix socket -v list version info -V verbose search |-w Warnings ( ) -X skip TCP&UDP files -Z Z context [Z] -- end option scan f|-f filesystem or -file names -F [f] select fields; -F? for help |-L [l] list ( ) suppress (-) link counts < l (0 = all; default = 0) m [m] use|create mount supplement |-M portMap registration (-) -o o o 0t offset digits (8) -p s exclude(^)|select PIDs -S [t] t second stat timeout (15) -T qs TCP/TPI Q,St (s) info -g [s] exclude(^)|select and print process group IDs -i i select by IPv[46] address: [46][proto][@host|addr][:svc_list|port_list] |-r [t] repeat every t seconds (15); until no files, - forever -u s exclude(^)|select login|UID set s -x [fl] cross over d| D File systems or symbolic Links names select named files or files on named file systems Anyone can list all files; /dev warnings disabled; kernel ID check disabled. 2. --version root@localhost:/root> lsof -v lsof version information: revision: 4.78 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man constructed: Mon Aug 1 11:10:47 CST 2011 compiler: x86_64-target-linux-gnu-gcc compiler flags: -DLINUXV=26016 -DGLIBCV=yes -DHASIPv6 -DHASSELINUX -D_FILE_OFFSET_BITS=64 -DLSOF_VSTR="2.6.16" -g -O2 -fomit-frame-pointer -pipe loader flags: -L./lib -llsof -lselinux system info: Linux 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux Anyone can list all files. /dev warnings are disabled. Kernel ID check is disabled. |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |