Usually collect some commands for easy use.
1:LS-LRT Sort by Time show
2:nslookup View DNS resolution
3:lsof-p Process Number
Lsof ' which httpd '//That process is using Apache executable file
LSOF/ETC/PASSWD//The process is taking up/etc/passwd
LSOF/DEV/HDA6//The process is taking up Hda6
Lsof/dev/cdrom//The process is occupying the optical drive
Lsof-c sendmail//view file usage for SendMail process
Lsof-c courier-u ^zahn//shows that those files are opened with a process that starts with courier, but does not belong to the user Zahn
Lsof-p 30297//show those files are turned on by PID 30297 process
LSOF-D/TMP Displays all the processes that are open in the/tmp folder for instance and files. But the symbol file is not listed
lsof-u1000//View UID is 100 user's process file usage
Lsof-utony//View user Tony's process file usage
Lsof-u^tony//view file Usage for processes that are not user Tony (^
Lsof-i//Show all open ports
lsof-i:80//Show all open port 80 processes
Lsof-i-u//Show all open ports and UNIX domain files
lsof-i [email& Nbsp;protected][url]www.akadia.com:123//shows those processes that have opened a link to www.akadia.com UDP 123 (NTP) port
Lsof-i [email Protected]:ftp-r//Constantly check the current FTP connection situation (-r,lsof will continue to execute forever until the interrupt signal is received, +R,LSOF will continue to execute until no file is displayed, default is 15s refresh)
Lsof-i [email protected]:ftp-n//lsof-n does not convert IP to hostname, the default is not to add the-n parameter