100 Useful Command-Line Utilities
by Oliver; 2014102. lsof
lsof shows all open files on your computer and tells you which user and process ID is opening the particular file. This is surprisingly useful for debugging, among other things. Want to see what files myprogram is opening or writing to? Is it, say, writing to the /tmp directory? Try:$ lsof | grep myprogramTo show your network connections, use:
$ lsof -iRead more: