LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-23-2004, 02:25 AM   #1
mikeccs
LQ Newbie
 
Registered: Jul 2004
Location: Malaysia
Distribution: RedHat EL AS3
Posts: 9

Rep: Reputation: 0
Unhappy Command line to search where's the apllication installed


Good day to everyone..

I have a RH EL AS3 machine, i have get Apache(httpd), mySQL, Java, tomcat installed on the machine. How am i gonna to check where's the directory for those application installed by using command line on terminal.

How do i know which directory refer to which application?


Thanks for the Help!
 
Old 07-23-2004, 02:33 AM   #2
Zoombie
Member
 
Registered: Jul 2003
Distribution: Debian Testing
Posts: 180

Rep: Reputation: 30
You can try the whereis command if you know the name of a binary a program uses. For instance, for apache2, you could issue whereis apache2. My output for that command is:
Code:
apache2: /usr/sbin/apache2 /etc/apache2 /usr/lib/apache2 /usr/include/apache2 /usr/man/man8/apache2.8.gz /usr/share/man/man8/apache2.8.gz
Unfortunately, it won't give you the document root or anything, but it's a start.

Also, I'm not sure about Redhat, but on most systems, these paths are common:
Apache data: /var/www
Apache config: /etc/apache or /etc/apache2
MySQL data : /var/lib/mysql

My Java is installed at /opt/blackdown-jre-version.

I hope that helps.
 
Old 07-23-2004, 03:04 AM   #3
mikeccs
LQ Newbie
 
Registered: Jul 2004
Location: Malaysia
Distribution: RedHat EL AS3
Posts: 9

Original Poster
Rep: Reputation: 0
Wink Thanks for the Help!!

Thanks for the kindly help Zoombie, the "whereis" command are really helpful.

I have been trying some testing on my machine, the funny thing is when i key
in "whereis apache2" in the terminal its cames out with a result "apache2:"
.. there is no furthur details on the directory.. but when i key in "whereis httpd"
it display the result which is similar with you.. namely;

/usr/sbin/httpd.worker /usr/sbin/httpd /etc/httpd /usr/lib/httpd /usr/include/httpd /usr/share/man/man8/httpd.8.gz
Untitled 1

.. maybe we are using 2 different distribution.. anyway, i am very appreciated of your reply. Thanks
 
Old 07-23-2004, 03:41 AM   #4
calluminsky
Member
 
Registered: Jul 2004
Location: Milton Keynes, UK
Distribution: Red Hat Fedora
Posts: 35

Rep: Reputation: 15
Hi

You can also use the find command to look for files/binaries...

try:

find / -name <fileyourlookingfor> -print

That should search the system. You can also wildcard it so if you know that the file has say, "word" in it's name but you're not sure, try:

find / -name *word* -print

Hope that helps!

Calluminsky
 
Old 07-23-2004, 04:07 AM   #5
mikeccs
LQ Newbie
 
Registered: Jul 2004
Location: Malaysia
Distribution: RedHat EL AS3
Posts: 9

Original Poster
Rep: Reputation: 0
Thumbs up Good Effort

Thank you Calluminsky, that was a very good effort. Try & tested on my machine.. mostly like a search engine things.

Thanks a lot..
 
Old 07-23-2004, 04:08 AM   #6
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
'locate' is good too, and usually faster than find since it works off a database rather than searching the directories.

John
 
Old 07-23-2004, 04:12 AM   #7
gaviidae
Member
 
Registered: Jun 2004
Location: West Michigan
Distribution: limping along with MD10, Knoppix3.6 : )
Posts: 62

Rep: Reputation: 15
I can't ever use "find" because I'm always told to updatedb as root, and I've tried
typing as root "updatedb" because it sounds like a command but that isn't quite right.
"Locate" does the trick for me.
 
Old 07-23-2004, 07:42 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
"updatedb" is just the command to update the database "locate" uses.

It is usually run by cron.daily though I put it into cron.monthly and start it by hand when necessary.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vim 'n' lynx: command line option to search for string Samsara Linux - Software 6 01-02-2013 06:36 PM
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
CVS Command Line tool not installed? TehFlyingDutchman Linux - Newbie 4 11-20-2005 06:51 PM
Installed 2.6.10 kernel on 10.1 and now I can't see command line... cereal83 Slackware 9 02-08-2005 11:31 AM
Which version of a program is installed through command line case23_69 Linux - Newbie 2 11-17-2004 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration