Saturday, May 31, 2008

new command a day / a few days / a week

Here is trying to start something that I probably will not be able to keep up with unless I keep a "floating" frequency option. The idea is to try and note a previously unused shell command.

Today's entry:
lsof -i : lsof will list open files, and the "-i" option is to list files/sockets for an interface.
Seems to be more useful as compared to "netstat" for listing open TCP/UDP connections.

example:
rutul@rutul-laptop:~$ sudo lsof -i
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
avahi-dae 4865 avahi 14u IPv4 12827 UDP *:mdns
avahi-dae 4865 avahi 15u IPv4 12828 UDP *:50260
cupsd 4895 root 2u IPv4 12863 TCP localhost:ipp (LISTEN)
dhclient3 5601 dhcp 4u IPv4 12003 UDP *:bootpc
dhclient3 6112 dhcp 4u IPv4 11489 UDP *:bootpc
firefox 13310 rutul 19u IPv4 114592 TCP rutul-laptop.local:39018->ar-in-f191.google.com:www (ESTABLISHED)
rutul@rutul-laptop:~$

No comments: