LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 12-17-2013, 04:46 AM   #1
omkar.jadhav
LQ Newbie
 
Registered: Aug 2013
Posts: 11

Rep: Reputation: Disabled
list of only registered applications on linux machine


i am trying to list all the registered applications installed on linux machine.
can someone suggest way to find this list using rpm or any other command/small script.
i have tried the below command which using 'g' switch to list down all the packages which are part of that group:

Code:
rpm -qg Applications/Archiving
 
Old 12-17-2013, 05:44 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
You can use both of these on Red Hat/Fedora machines:
Code:
yum list installed
rpm -qa
 
Old 12-17-2013, 05:50 AM   #3
omkar.jadhav
LQ Newbie
 
Registered: Aug 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
You can use both of these on Red Hat/Fedora machines:
Code:
yum list installed
rpm -qa
thanks for the commands..but i am looking only for the applications list excluding all other types of packages.
could u help me in getting this list by using any of the switches or scripts
 
Old 12-17-2013, 05:55 AM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by omkar.jadhav View Post
thanks for the commands..but i am looking only for the applications list excluding all other types of packages.
could u help me in getting this list by using any of the switches or scripts
I don't know what you mean by "applications". Maybe you need the grouplist command - here on Centos 6.5:

Code:
# yum grouplist|grep -i application
   Internet Applications
   TurboGears application framework
There is nothing named Archiving or similar.

What distribution are you using? Perhaps it has "applications" and a certain way to list them.
 
Old 12-17-2013, 06:51 AM   #5
omkar.jadhav
LQ Newbie
 
Registered: Aug 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
I don't know what you mean by "applications". Maybe you need the grouplist command - here on Centos 6.5:

Code:
# yum grouplist|grep -i application
   Internet Applications
   TurboGears application framework
There is nothing named Archiving or similar.

What distribution are you using? Perhaps it has "applications" and a certain way to list them.
I am trying to find only the list of installed applications and related packages. I want to exclude all the other packages which are either drivers or sustem related.
Simillar to the below mentioned command
Code:
yum grouplist|grep -i application
is there any way by which i can get list of applications related rpms (probably by using rpm -qa ) command.
 
Old 12-17-2013, 07:21 AM   #6
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by omkar.jadhav View Post
I am trying to find only the list of installed applications and related packages. I want to exclude all the other packages which are either drivers or sustem related.
Simillar to the below mentioned command
Code:
yum grouplist|grep -i application
is there any way by which i can get list of applications related rpms (probably by using rpm -qa ) command.
I don't think yum or rpm distinguish between kernel, system, driver and application packages. The distinction would be fuzzy in any case: An application may come with a driver or kernel component.
 
Old 12-17-2013, 08:16 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
yes, would be nice to specify what do you mean by application. vi is one of them? What about vim, gvim? Are they 3 different apps or just only one.
I do not think you can have a general algorithm to recognize all the executables (if they are installed/registered or not, is a "real" app or not).
 
Old 12-17-2013, 08:49 AM   #8
omkar.jadhav
LQ Newbie
 
Registered: Aug 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
yes, would be nice to specify what do you mean by application. vi is one of them? What about vim, gvim? Are they 3 different apps or just only one.
I do not think you can have a general algorithm to recognize all the executables (if they are installed/registered or not, is a "real" app or not).

we can query the rpms using command
Code:
rpm -qg <group name>
and as per my knowledge there are below listed groups in which developer adds/tag corresponding rpms:
Amusements/Games
Amusements/Graphics
Applications/Archiving
Applications/Communications
Applications/Databases
Applications/Editors
Applications/Emulators
Applications/Engineering
Applications/File
Applications/Internet
Applications/Multimedia
Applications/Productivity
Applications/Publishing
Applications/System
Applications/Text
Development/Debuggers
Development/Languages
Development/Libraries
Development/System
Development/Tools
Documentation
System Environment/Base
System Environment/Daemons
System Environment/Kernel
System Environment/Libraries
System Environment/Shells
User Interface/Desktops
User Interface/X
User Interface/X Hardware Support

i have few queries on this :
1. are these mentioned groups are standard one for every linux flavours ?
2. Can we make the above mentioned command work to list only the packages which are assigned to Application related group.
For eg : the below command will list only rpm packages which are assigned to Applications/Text group:
Code:
[root@VM172016001139 ~]# rpm -qg Applications/Text
diffutils-2.8.1-15.2.3.el5
ed-0.2-39.el5_2
m4-1.4.5-3.el5.1
grep-2.5.1-55.el5
by anyway i can twik this command to give all the list of packages whgich are assigned to Group "Applications/<any group>?

Thnaks in advance for your guidance.
 
1 members found this post helpful.
Old 12-18-2013, 01:02 AM   #9
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by omkar.jadhav View Post
we can query the rpms using command
Code:
rpm -qg <group name>
Thanks. I have to admit I didn't know about groups.
Quote:
i have few queries on this :
1. are these mentioned groups are standard one for every linux flavours ?
No. To begin with, not all distros use RPM. Also, the group list seems to change with time; on my system the file /usr/share/doc/rpm-4.8.0/GROUPS documents 29 groups, but I currently have 44 groups. Run rpm -qa --qf '%{group}\n' \* |sort -u to see them all.

Quote:
2. Can we make the above mentioned command work to list only the packages which are assigned to Application related group.
The shell comes to your rescue. Something like this should work:
Code:
for group in $(rpm -qa --qf '%{group}\n' \* |grep Application|sort -u)
do
    rpm -qg $group
done
 
Old 12-18-2013, 01:24 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
actually I have an ubuntu, running synaptic (as package manager) and I have no such group (applications)
Therefore I would say that kind of grouping is not standard for every linux flavours.
 
Old 12-18-2013, 02:21 AM   #11
omkar.jadhav
LQ Newbie
 
Registered: Aug 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Thanks. I have to admit I didn't know about groups.

No. To begin with, not all distros use RPM. Also, the group list seems to change with time; on my system the file /usr/share/doc/rpm-4.8.0/GROUPS documents 29 groups, but I currently have 44 groups. Run rpm -qa --qf '%{group}\n' \* |sort -u to see them all.


The shell comes to your rescue. Something like this should work:
Code:
for group in $(rpm -qa --qf '%{group}\n' \* |grep Application|sort -u)
do
    rpm -qg $group
done

this is the thing for which i was looking for...thanks a trillion berndbausch...thanks for helping new bee like me..
 
Old 12-18-2013, 02:33 AM   #12
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by omkar.jadhav View Post
this is the thing for which i was looking for...thanks a trillion berndbausch...thanks for helping new bee like me..
You're very welcome!

One thing I should have done is explain this gibberish to you:

Code:
rpm -qa --qf '%{group}\n' \* |grep Application|sort -u
rpm -qa lists all installed packages. --qf provides a printing format; in this case, we print %{group}\n for each package, that is the group the package belongs to, followed by a newline.
The '\*' is redundant; I just copied the string from a webpage without thinking. Better leave it out.
We use grep to filter those groups that contain the word Application, and finally sort -u to ensure that each group appears only once in the output.
 
1 members found this post helpful.
Old 12-18-2013, 02:36 AM   #13
omkar.jadhav
LQ Newbie
 
Registered: Aug 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by berndbausch View Post
You're very welcome!

One thing I should have done is explain this gibberish to you:

Code:
rpm -qa --qf '%{group}\n' \* |grep Application|sort -u
rpm -qa lists all installed packages. --qf provides a printing format; in this case, we print %{group}\n for each package, that is the group the package belongs to, followed by a newline.
The '\*' is redundant; I just copied the string from a webpage without thinking. Better leave it out.
We use grep to filter those groups that contain the word Application, and finally sort -u to ensure that each group appears only once in the output.
thanks a lot again for explaining me the command
 
Old 12-18-2013, 05:07 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 8 .
Quote:
1. are these mentioned groups are standard one for every linux flavours ?
No. The mentioned groups look like Fedora / Redhat only.
And of course the free versions of RHEL : CentOS, Scientific Linux.

Suse, Mandriva, PCLinuxOS will use other group names.

-
 
  


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
Gnome problem with associated applications for registered file types mert_da Linux - Software 2 10-06-2010 11:26 AM
[SOLVED] Get List of 'Registered' Wallpaper (Gnome) fukawi2 Linux - Desktop 1 07-14-2009 09:45 PM
Get all registered applications in C? nwarrenfl Programming 1 06-15-2009 12:35 PM
List of standalone, portable linux applications mahdif Linux - Software 9 03-17-2009 05:11 AM
Linux Network TC OS or Applications List here. wicko Linux - Newbie 3 11-25-2007 10:27 AM


All times are GMT -5. The time now is 12:45 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration