LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 03-20-2003, 08:21 AM   #1
awlad
LQ Newbie
 
Registered: Feb 2003
Posts: 9

Rep: Reputation: 0
comand to check if program is installed or not?


Is there a linux command to check if a program is installed on the linux server or not?

I know you can use whereis <program name> but thats not very useful.

Is there any command like rpm -q <program name>

I believe rpm -q will only check if any rpm program installed.

But how do you check other installed program??

--awlad
 
Old 03-20-2003, 08:35 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
whereis should be fine normally, also try a locate on it. or just plain run it. there is no central database for programs installed from a plain source tarball.
 
Old 03-20-2003, 10:21 AM   #3
PhilD
Member
 
Registered: Mar 2003
Location: Iowa, US
Distribution: Gentoo!!, Mandrake 9.1
Posts: 170

Rep: Reputation: 30
Often as a last resort, you can use the find command. It is a little bit more cryptic than whereis or locate. Below is an example...

find / -name ProgName -print

This would search from the root directory recursively for a file or directory with the name ProgName and print it out to the screen. you can also use the wild card * but you must and a preceding \ as such..

find /usr -name Prog\* -print

At least this has been my finding. As a last resort su to root and use the first command to search your entire system for a program.

Hope this helps. It may be worth looking at the man pages for find.

PhilD
 
Old 03-20-2003, 10:39 AM   #4
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Another thing you can do is:

<TAB> <TAB> <TAB>

in a shell. That is hit the tab key three times. You will then get a list of all installed programs.

I learned that from my teacher MasterC Kenobi.
 
Old 03-20-2003, 10:58 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
that won't show all installed programs, that will show all executable binaries on your current path.... same as the whereis or which command will find their information
 
Old 05-18-2003, 03:23 PM   #6
mjolnir
Member
 
Registered: Apr 2003
Posts: 665

Rep: Reputation: 68
Can "updatedb" be forced to add windows files to the database?
"Find" works but only if I cd to Windows.
 
Old 05-18-2003, 03:43 PM   #7
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
updatedb (when called normally) should be including your win files. Check your updatedb command (and any aliases) to see if it's excluding specific filesystems, something like this would exclude vfat (AFAIK):
updatdb -f vfat
I think that excludes vfat from being included. So if your updatedb is being called with that, then you simply need to call it regularly.

HTH

Cool
 
Old 05-18-2003, 08:09 PM   #8
mjolnir
Member
 
Registered: Apr 2003
Posts: 665

Rep: Reputation: 68
Thanks for the reply MasterC. I ran man updatedb and -f option does exclude other fs types. This flag is default, -u. Locate aliase
gave 200+ entries. I ran cat on /etc/aliases,bashrc,and profile but
didn't see much that I understood,(not yet anyway). It's a minor
thing since I have to cd to windows any way to access files. Is there a command to run to see what options updatedb is using?
 
Old 05-18-2003, 08:20 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,974
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Check out /etc/updatedb.conf


Usually non-linux filesystems, network
filesystems and proc, /tmp and such are
excluded from locate... you can do that
with either the PRUNEFS or PRUNEPATHS
statements...

HIH

Cheers,
Tink
 
Old 05-18-2003, 09:33 PM   #10
mjolnir
Member
 
Registered: Apr 2003
Posts: 665

Rep: Reputation: 68
Thanks Tinkster. I opened up updatedb.conf with vim,edited out
/mnt from PRUNEPATHS,and vfat from PRUNEFS. Now locate works
like a charm on my fat32 partition. I have a lot to learn but the
journey will be much easier with people like you, MasterC, and
others in this forum who have been kind enough to help.
 
Old 05-18-2003, 09:34 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,974
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
/me feels honoured and bows to Mjolnir:"Pleasure :} - glad I could help!"

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to check installed program in system? gmitra Programming 2 01-30-2005 03:22 PM
How to check SW installed not by rpm maxgg Linux - Newbie 1 12-23-2004 09:29 AM
How do I check what wm I have installed. mlsbraves *BSD 12 12-08-2004 10:25 PM
How do I check if Apache is installed? jmg1894 Linux - Newbie 4 07-15-2004 02:23 PM
How to check for installed software... tarballed Linux - General 3 04-02-2003 04:12 PM


All times are GMT -5. The time now is 02:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration