lsof print numeric ports lsof print numeric ports unix unix

lsof print numeric ports


Run lsof -P. According to man lsof, -P inhibits the conversion of port numbers to port names for network files. Inhibiting the conversion may make lsof run a little faster. It is also useful when port name lookup is not working properly."


Sometimes handy is:

lsof -Pi

When I tried losf -iP it gave me some trash, so make sure P goes first.


As a side note: lsof -3.14 will provide the same trash, don't try this.