-2

I have a rogue perl script that is running on a Linux box. Is there a way to see where is this script located?

4
  • 3
    This 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 Dec 28, 2011 at 22:22
  • 1
    So you have a problem with the color red. How are we supposed to help with that? :)
    – EEAA
    Dec 28, 2011 at 22:28
  • 1
    You have a red Perl script?
    – ceejayoz
    Dec 28, 2011 at 22:29
  • 3
    No! It is rouge, not red. Can't you red what he is writing?!
    – mailq
    Dec 28, 2011 at 22:51

2 Answers 2

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.

1
  • 2
    you 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, 2011 at 10:10
3

You could use ps -auxww | grep 'nameofrogueperlscript or ps -auxww | grep perl which may expose the information you are looking for.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .