Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

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

 
discard

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.