lsof is not working for me on Mac OS X 10.13 - gives error, I'm trying to find process accessing a specific IP address

lsof isn't working for me. I'm trying to use instructions in posts such as How do I find out which program and process ID accesses a given IP address in macOS? to find which process is accessing a specific IP address. But on OSX 10.13 it gives me:

% sudo lsof -i 1.2.3.4

Password:

lsof: unknown protocol name (1.2.3.4) in: -i 1.2.3.4 lsof 4.91 latest revision: ftp:// latest FAQ: ftp:// latest man page: ftp:// usage: [-?abhlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names] Use the ``-h'' option to get more help information.

what am I doing wrong?

1 Answer

According to the manual page for lsof(8), the syntax should be:

sudo lsof -i @1.2.3.4

(Note the "@".)

It's possible the original Answer you were going off of had a typo, or perhaps the syntax for lsof(8) has changed.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like