Finding installed packages on Linux machine

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Finding installed packages on Linux machine
# 1  
Old 11-15-2013
Finding installed packages on Linux machine

Hi,

i am trying to grab all the installed packages on linux machine,and only want to grab "Name" "Version" "Release" "Vendor" information
i am using below command to do so :
Code:
 
rpm -qa --info | grep -e 'Name' -e 'Version' -e 'Release' -e 'Vendor'

Code:
 
the output contains lot other info like below:
Name        : libidn                       Relocations: (not relocatable)
Version     : 0.6.5                             Vendor: Red Hat, Inc.
Release     : 1.1                           Build Date: Thu 13 Jul 2006 08:20:40 AM BST
Summary     : Internationalized Domain Name support library
Names (IDN) working group, used for internationalized domain
Name        : libXau                       Relocations: (not relocatable)

can someone help me with script in extarcting just the name,version,release,vendor on a separate lines..
# 2  
Old 11-15-2013
You may nee to extend your searching. Try :-
Code:
rpm -qa --info | grep -e '^Name ' -e 'Version' -e 'Release' -e 'Vendor'

Note the trailing space for Name too.

It should give you:-
Code:
Name        : libidn                       Relocations: (not relocatable)
Version     : 0.6.5                             Vendor: Red Hat, Inc.
Release     : 1.1                           Build Date: Thu 13 Jul 2006 08:20:40 AM BST
Name        : libXau                       Relocations: (not relocatable)

I'm not sure if the last line may be a problem or if that is the next entry.


I hope that this helps.

Robin
Liverpool/Blackburn
UK
This User Gave Thanks to rbatte1 For This Post:
# 3  
Old 11-15-2013
thanks ...but i got the solution..there is in built switch availabale which gives you freedom to manipulate the data representation:

Code:
rpm -qa --queryformat 'Name:%{NAME}\nVersion:%{VERSION}-%{RELEASE}\nVendor:%{VENDOR}\n'

this will give u the output as follow:
Code:
 
Name:linuxwacom
Version:0.7.8.3-11.2.el5_8
Vendor:Red Hat, Inc.

This User Gave Thanks to omkar.jadhav For This Post:
# 4  
Old 11-15-2013
Thanks for this. I'm happy to learn of it too. Smilie



Robin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help Uninstalling Packages that were Installed Today

Hello All, SuSE 11 SP3 (*3.0.101-0.47.71-default, x86_64) I was attempting to install a MySQL update on a web server we use for internal stuff within the network. Since the OS didn't come with an update in the pre-installed repos, I went to MySQL's site and found a Repo for my OS version at... (0 Replies)
Discussion started by: mrm5102
0 Replies

2. Linux

get total number of packages installed?

Hi, Which command would tell me of how many total number packages installed on my Redhat? Thank you, Lam (2 Replies)
Discussion started by: lamoul
2 Replies

3. Solaris

Having solaris installed over VM ware machine in windows

I have installed solaris 10 over VM ware in windows machine. now i want to share the files from windows to solaris. how can i do so.. and pls tell if through putty i can access the solaris from windows machine without logging onto VMware. (4 Replies)
Discussion started by: jain_sharad143
4 Replies

4. Ubuntu

What time did Ubuntu installed on machine?

How can I learn what time OS installed time and release information. (4 Replies)
Discussion started by: getrue
4 Replies

5. Red Hat

How do I network a Suse installed machine with other computers, specifically Red hat Linux?

How do I network a Suse installed machine with other computers, specifically Red hat Linux? This is for a school project, and I can't find any pages that tell how to network a Suse to other computers except how to use a printer. (1 Reply)
Discussion started by: Anna Hussie
1 Replies

6. Linux

Launching X apps from a machine without X installed

Hi. Here's my setup: a workstation with an X server a CentOS server with no X server installed (development, security is not a concern) a GUI application installed on the server When I ssh to that machine, I get: ssh -Xl root 192.168.x.x Warning: untrusted X11 forwarding setup... (4 Replies)
Discussion started by: flj
4 Replies

7. Shell Programming and Scripting

User perl to get memory installed in a machine

I currently have a statistics gathering script i run on my Linux servers. One of the stat i gather is total memory in the machine. The script is all perl with the exception of gathering the memory for that i use the following command: $ram = (`cat /proc/meminfo | grep "MemTotal" | awk... (1 Reply)
Discussion started by: insania
1 Replies

8. Linux

Findout iLO type installed in a machine

I have to write Linux script to findout what kind of ilo is been installed in the given ip address either ilo/LO100 or no device found. IP address will be given in the command line of the script. -> With out log on to the ip address, should get the ilo type installed in that machine. 1. I... (1 Reply)
Discussion started by: skmdu
1 Replies

9. UNIX for Advanced & Expert Users

how can i know the latest update packages i have installed on solaris 9 ???

i want to know the update packages that i have installed on my solaris 9 (2 Replies)
Discussion started by: MONMON
2 Replies

10. Shell Programming and Scripting

How to Find JRE installed in linux machine..?

Hi all, Im new to linux... Im in need to write a shell script to check wthr JRE in linux machine... Wtz de best way to find thru BASH?? Plz help me out to solve this issue... Thanks (3 Replies)
Discussion started by: XivaX
3 Replies
Login or Register to Ask a Question