# File check
lsof | grep -i <filename>
# e.g set up a file that is open
vi /home/oracle/junk # then write the file – and keep it open with vi
# now from a different xterm – I’m using root but you don’t have to
[root@oel66-79 oracle]# lsof | grep -i junk
vim 2665 oracle 3u REG 251,2 12288 1572317 /home/oracle/.junk.swp
# may also be of some value
fuser -m -v /home/oracle/junk
# Port Check
lsof | grep -i <port_number>