<p>lsof is an increadibly powerful command-line utility for unix systems. It lists open files, displaying information about them. And since most everything is a file on unix systems, lsof can give sysadmins a ton of useful diagnostic data.</p>

<p>What are some of the most common and useful ways of using lsof, and which command-line switches are used for that? </p>

```
lsof -i
```
will provide a list of open network sockets. The
```
-n
```
option will prevent DNS lookups, which is useful when your network connection is slow or unreliable.