LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   list of only registered applications on linux machine (https://www.linuxquestions.org/questions/linux-newbie-8/list-of-only-registered-applications-on-linux-machine-4175488265/)

omkar.jadhav 12-17-2013 03:46 AM

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

TobiSGD 12-17-2013 04:44 AM

You can use both of these on Red Hat/Fedora machines:
Code:

yum list installed
rpm -qa


omkar.jadhav 12-17-2013 04:50 AM

Quote:

Originally Posted by TobiSGD (Post 5082167)
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

berndbausch 12-17-2013 04:55 AM

Quote:

Originally Posted by omkar.jadhav (Post 5082173)
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.

omkar.jadhav 12-17-2013 05:51 AM

Quote:

Originally Posted by berndbausch (Post 5082176)
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.

berndbausch 12-17-2013 06:21 AM

Quote:

Originally Posted by omkar.jadhav (Post 5082212)
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.

pan64 12-17-2013 07:16 AM

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).

omkar.jadhav 12-17-2013 07:49 AM

Quote:

Originally Posted by pan64 (Post 5082292)
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.

berndbausch 12-18-2013 12:02 AM

Quote:

Originally Posted by omkar.jadhav (Post 5082327)
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


pan64 12-18-2013 12:24 AM

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.

omkar.jadhav 12-18-2013 01:21 AM

Quote:

Originally Posted by berndbausch (Post 5082999)
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..:)

berndbausch 12-18-2013 01:33 AM

Quote:

Originally Posted by omkar.jadhav (Post 5083044)
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.

omkar.jadhav 12-18-2013 01:36 AM

Quote:

Originally Posted by berndbausch (Post 5083051)
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 :)

knudfl 12-18-2013 04:07 AM

# 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.

-


All times are GMT -5. The time now is 08:46 AM.