Simply running the lsof commands gives us a list of all the open files on the system. By using the -u option and specifying the username, we get a list of open files for a particular user.
When we use the -i option and specify a port number, we get information about any process running on that port.
When we use both the -i and -u options with a particular username, we get information about the files and commands being accessed by that user.