I'm trying to figure out the best and fastest way of finding files whose content is specifically "something"
Here's the reason: I have a process that I'm pretty sure stores its PID somewhere in a file, but I don't know where (and I want to find out). I have tried looking for filenames that may be used for storing said pid (
/var/run/myproc.pid, and so on), but without success so far. I would like to give it a try searching for files whose content is just that number. I'd like to get the PID from
ps -aux or
top, or some tool like that and then search for files whose content is only that number.
I've been googling around but all the answers seem to explain how to find files that contain "something"... among its contents. I want something slightly different... I want an exact match of that "something"
Thank you in advance.