Determine if installed.

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Determine if installed.

Post by alex.barylski »

I tried figuring out a way a while back to determine if Apache was installed, where it was installed and if it was running.

Sometimes the daemons appear to run as httpd and others as apache so relying on *just*

Code: Select all

ps -aux | grep httpd
Or whatever the command is...just doesn't cut the mustard. Although I do believe that most Linux apps include their install directory as part of the command line options, at least (from what I remember) Apache does. So long as you can find Apache you can auto-locate it's path. Using PHP anyways.

Now, similar question. How can I do this for Subversion but using only native commands, no PHP!!!

Is there anyway to deduce where a application is installed (particularly the one just mentioned) on a system?

Obviously grepping for svn or whatever might not always work as you could easily be returned more than one installed or available copies, right?

Anyone ever reseach into something like this? How do you go about's guestimating a proggie's location...
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

Code: Select all

which svn
or

Code: Select all

which svnserve
depending on what executable you're looking for.
Post Reply