how to find out the full path of the command from the result of lsof -i
11
votes
5
answers
24762
views
lsof
is a great utility, just now started using it.
lsof -i | grep smtp
=> this give the following result.
httpd.pl 212548 global 3u IPv4 893092369 0t0 TCP server07.host...blah...
In the above example, httpd.pl
is perl script, which sends spam emails.
**How can I know the full path of the command. i.e in the above result**, I want to know the full path of httpd.pl
I tried searching in home dir, the file httpd.pl
is not there.
and also, I tried with lsof -p PID
, this also does not give the path to it.
Is there any way, I can get the full path of that file ?
Note: This kind of problem is very common in shared hosting environment. So, it will be very useful for shared hosting or any web server administrator.
Asked by Mani
(634 rep)
Feb 3, 2015, 05:48 AM
Last activity: May 5, 2024, 11:12 PM
Last activity: May 5, 2024, 11:12 PM