LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A script is running from an unknown location.how we can find its exact location. (http://www.linuxquestions.org/questions/linux-newbie-8/a-script-is-running-from-an-unknown-location-how-we-can-find-its-exact-location-944841/)

saurav23june 05-14-2012 05:10 AM

A script is running from an unknown location.how we can find its exact location.
 
A script is running from an unknown location in the system.How we can find its exact location.We only know the name of the script.

acid_kewpie 05-14-2012 05:12 AM

lsof will probably show the full path of the script for you.

Satyaveer Arya 05-14-2012 05:52 AM

You can also use locate command to locate the full path with file name of your file.
Example-
Code:

# locate <filename>

chrism01 05-15-2012 01:44 AM

Try any/all of

locate
fuser
lsof
find
ps -auxwww

zXi 05-15-2012 01:52 AM

lsof -r 1 <script name>

catkin 05-15-2012 05:27 AM

The question is similar to whether a running script can determine its own location. It is not possible in all cases. More at Greg's WIKI.


All times are GMT -5. The time now is 09:19 PM.