Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-14-2012, 04:10 AM
|
#1
|
LQ Newbie
Registered: May 2012
Location: Mumbai,India
Distribution: RHL 9.0
Posts: 1
Rep: 
|
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.
|
|
|
05-14-2012, 04:12 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
lsof will probably show the full path of the script for you.
|
|
|
05-14-2012, 04:52 AM
|
#3
|
Senior Member
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
|
You can also use locate command to locate the full path with file name of your file.
Example-
Code:
# locate <filename>
|
|
|
05-15-2012, 12:44 AM
|
#4
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,429
|
Try any/all of
locate
fuser
lsof
find
ps -auxwww
|
|
|
05-15-2012, 12:52 AM
|
#5
|
LQ Newbie
Registered: May 2012
Posts: 28
Rep: 
|
lsof -r 1 <script name>
|
|
|
05-15-2012, 04:27 AM
|
#6
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
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 01:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|