I am using a Debian 9.13. Trough ps -aux | grep NaughtyProcessName
i can find information about a given process that interests me in the format:
user.name [ID] [CPU USAGE] [%MEM] VSZ RSS TTY STAT START TIME COMMAND
Where command shows something like:
path/to/interpreter ./file_name.cmd
So i suppose some user was inside a mysterious directory which had file_name.cmd
inside it and spawned a process by doing ./file_name.cmd
. The process uses the interpreter found in path/to/interpreter
.
I want to know in which directory this file is. The only thing i know that i could try is
cd /
find -iname file_name.cmd
But that takes time and could find duplicates. Is there anything better and more straight to the point?