0

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://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man 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 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .