Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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 – Mathias R. Jessen Dec 28 '11 at 22:22
So you have a problem with the color red. How are we supposed to help with that? :) – EEAA Dec 28 '11 at 22:28
You have a red Perl script? – ceejayoz Dec 28 '11 at 22:29
No! It is rouge, not red. Can't you red what he is writing?! – mailq Dec 28 '11 at 22:51
up vote 2 down vote accepted

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.

share|improve this answer
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

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.