Find process through file opened

Hello all,

I have a file that is growing and growing by the action of any process.
How can I find what process is?

Thank you

you can use "lsof"

lsof | grep "/usr/bin/gnome-session"

output should look like:

COMMAND     PID      USER   FD      TYPE             DEVICE SIZE/OFF       NODE NAME
gnome-ses 25425    user  txt       REG                8,5   240088      91979 /usr/bin/gnome-session

1 Like

try fuser -u filename --there you see process who uses that file

1 Like