I have a rogue perl script that is running on a Linux box. Is there a way to see where is this script located?
Asked
Active
Viewed 277 times
-2
-
3This is like calling a travel agency and saying: "Hi! I once went somewhere hot and rainy, it was really nice, i forgot the name though. Could you book me at hotel and flight for that place?" Please be more specific – Mathias R. Jessen Dec 28 '11 at 22:22
-
1So you have a problem with the color red. How are we supposed to help with that? :) – EEAA Dec 28 '11 at 22:28
-
1You have a red Perl script? – ceejayoz Dec 28 '11 at 22:29
-
3No! It is rouge, not red. Can't you red what he is writing?! – mailq Dec 28 '11 at 22:51
2 Answers
3
You could use ps -auxww | grep 'nameofrogueperlscript
or ps -auxww | grep perl
which may expose the information you are looking for.

user9517
- 115,471
- 20
- 215
- 297
2
Use top, and hit 'c' to see full command line.
Then you'll have it's name.
Run locate NAME to find it. (if your locate database is up to date)
If that doesn't work, you can use 'find' to find it from the root directory.

Joel K
- 5,853
- 2
- 30
- 34
-
2you can use 'find' to find it....but it will hurt the performance and take a long time to do that. If you've got the pid, then `lsof -p ${PID}` will show all the open files associated with the process - including the running file. – symcbean Dec 29 '11 at 10:10