|
|
Easily list open files and their owners
You can use lsof to view nework connections as well.
I find this useful when I'm using iTunes:
lsof | fgrep iTunes [snip] iTunes 29301 jason 20u IPv4 0x0268bce4 0t0 TCP my.computer:daap->another.computer:49253 (ESTABLISHED) iTunes 29301 jason 21r VREG 14,28 6730659 1360895 /Volumes/Users/jason/Music/iTunes/iTunes Music/Delerium/Chimera/05 Truly.m4a iTunes 29301 jason 22u IPv4 0x014a4ad8 0t0 TCP my.computer:daap->another.computer:49256 (ESTABLISHED) [snip] As you can see, there are two connections between my computer and another computer. The addresses have been changed to protect the innocent. This shows that someone else is listening to my iTunes music, which I encourage. (I live on a college campus; there are between 3 and 10 other iTunes users at any time whose music I can listen to. And I keep my iTunes library available for others.) If there are two TCP connections (such as in the example given above) then that other person is streaming music from my computer. This is usually (not always) accompanied by an open song file. If there is only one TCP connection to the other computer then that person has only made a connection and is not streaming at this time. You can see that iTunes has a m4a (AAC encoded audio) file open. If I'm not listening to Truly then that means the visitor is listening to it. Here is another example. Suppose you want to know the exact address of an internet station that you're listening to so that you can use streamripper or something:
lsof | fgrep iTunes [snip] iTunes 29301 jason 22u IPv4 0x02320d1c 0t0 TCP my.computer:49262->64.236.34.196:http (ESTABLISHED) [snip] Now you know that 64.236.34.196 is the streaming server in question. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.32 seconds |
|