coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Thursday June 20, 2013


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?

Who's Online
We have 25 guests online

Newest Member

nbewwmbxog

Hit Counter
11735014 Visitors

cool Statistics
coolcommands:1338
Categories:83
Total queries:621841
Members:22813





Search coolcommands.com
Search Keyword:


coolcommand

lsof - how to list open files
Description

To list all open files:

# lsof

To list all open files on a device:

# lsof /dev/hd4

To see which tcp ports are listening on a server for a specific process id:

# lsof -p pid | grep -i tcp

To see listing of files open for a specific ip or port:

# lsof -i :[hostname|ip address][:service|port]

Exemple to find who is listening on port 18011:

# netstat -an | grep 18011 | grep LIST
tcp4 0 0 172.26.25.167.18011 207.96.246.57.53445 ESTABLISHED
tcp4 0 0 *.18011 *.* LISTEN

# lsof -i:18011
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
swora81 144574 root 6u IPv4 0x71910adc 0t0 TCP *:SL_18011 (LISTEN)
swora81 144574 root 11u IPv4 0x72022adc 0t0 TCP server1:SL_18011->server2:53445
(ESTABLISHED)
oracle 711808 daemon 11u IPv4 0x72022adc 0t0 TCP server1:SL_18011->server2:53445
(ESTABLISHED)
oracle 711808 daemon 21u IPv4 0x7244dadc 0t0 TCP server1:SL_18011->server2:53409
(CLOSE_WAIT)
Example

lsof -p 12000 | grep -i tcp

Return to search results

Random coolcommands

coolcommand: top - how to display and update information about the top cpu processes
Example: top
[show me the details]
coolcommand: how to get login name, suid, database and password in Sybase
Example: select name,suid,dbname,password from syslogins
[show me the details]
coolcommand: how to monitor routing table lookup misses and changes in Sun Solaris
Example: route monitor
[show me the details]
coolcommand: how to mount a cdrom manually in Sun Solaris
Example: mount -o ro /dev/dsk/c0t6d0s1 /mnt/cdrom
[show me the details]

coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1160
audet37
kah00na32
Mariom24
lebjf00014

Top 5 Searches

Category Solaris52059
Category AIX49318
Category General UNIX47865
solaris23555
aix22814

Terms of Use
Privacy
Contact


 
coolcommands.com © 2013. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum