<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d23884446\x26blogName\x3dJust+Another+Tech+Blog\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://justanothertechblog.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://justanothertechblog.blogspot.com/\x26vt\x3d-484221019928432923', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Just Another Tech Blog

Anything and everything having to do with technology, computers, science, and most of all... Linux! The documentation of my Linux endeavor.



The Ultimate Linux Command: lsof

Thursday, September 14, 2006

lsof is the Linux/Unix über-tool. I use it most for getting network connection related information from a system, but that's just the beginning for this amazing and little-known application. The tool is aptly called lsof because it "lists open files". And remember, in Unix just about everything (including a network socket) is a file. "

usage: [-?abhlnNoOPRstUvV] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]]
[-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]]
[-p s] [+|-r [t]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]]


"As you can see, lsof has a truly staggering number of options. You can use it to get information about devices on your system, what a given user is touching at any given point, or even what files or network connectivity a process is using. lsof replaces my need for both netstat and ps entirely. It has everthing I get from those tools and much, much more." Don't worry, the page explains all of these!

Read more!
Visit the lsof homepage!

Note from Nerd: Wow! This is pretty cool! I have never even heard of this command but looks pretty 1337. I have got to try this when I get my computer back up and running (new power supply has been ordered! Should arrive Friday!).
posted by linnerd40, Thursday, September 14, 2006


0 Comments:

Add a comment