Find file that maps to a listening port

On my VPS server I have a port that is open and is listening for a 'status' command when you connect to it to like so...

$ telnet host 1900
Trying host...
Connected to host.
Escape character is '^]'.
status
QMAIL;OK
APACHE;OK
HTTPD;OK
CRON;OK

Wondering if what command I can attempt to run to map the port to the file that it's reading for that command. Any ideas. Also include any with the assumption i have root access thanks.

lsof will show a socket open as a file descriptor - and open file - which it truly is.
If you know the port number you have the process pid that has the port open.
Read the looong man page for the options you want. You need the pid of the process holding a socket for the port

Use fuser/lsof/proc to find the files the process pid has open

thanks i'll try that. Also wondering if fstat -p will reveal the inum for it also.