LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A script is running from an unknown location.how we can find its exact location. (https://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 04: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 04:12 AM

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

Satyaveer Arya 05-14-2012 04: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 12:44 AM

Try any/all of

locate
fuser
lsof
find
ps -auxwww

zXi 05-15-2012 12:52 AM

lsof -r 1 <script name>

catkin 05-15-2012 04: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 06:59 PM.