-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?

Skylervich
  • 93
  • 1
  • 5

2 Answers2

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
  • 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 '11 at 10:10