1832456 Members
3053 Online
110043 Solutions
New Discussion

RPM listing

 
Sajeesh O.K
Advisor

RPM listing

Hi

Anybody know how to list the RPMs with extension in Redhat Linux. For Ex.

[root@olive1 ~]# rpm -qa | more
hwdata-0.146.12.EL-1
mingetty-1.07-3
setserial-2.17-17
termcap-5.4-3
glibc-2.3.4-2.13

I would like to have the list the RPM with extension like .i386.rpm

Thanks
Sajeesh
8 REPLIES 8
Muthukumar_5
Honored Contributor

Re: RPM listing

Try like,

# rpm -qia | awk '/Source/ { print $NF; }' | grep -E '\.rpm' | more

--
Muthu
Easy to suggest when don't know about the problem!
Sajeesh O.K
Advisor

Re: RPM listing

Muthu
This will give something like

hwdata-0.146.12.EL-1.src.rpm
mingetty-1.07-3.src.rpm
setserial-2.17-17.src.rpm
termcap-5.4-3.src.rpm
glibc-2.3.4-2.13.src.rpm

I am not looking for this.


Thanks
Sajeesh
Muthukumar_5
Honored Contributor

Re: RPM listing

Can you post this information of,

# rpm -qi hwdata-0.146.12.EL-1

# rpm -qi termcap-5.4-3

--
Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: RPM listing

I hope you have to try like,

# rpm --showrc | more

It is giving all informations.

install arch: field gives the extension. Not sure.

--
Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: RPM listing

# rpm -qa | while read rpm; do echo "${rpm}$(rpm --showrc ${rpm} | awk -F": " '/install arch/
{ print "."$2".rpm"; }')"; done

will give it.

--
Muthu
Easy to suggest when don't know about the problem!
Manuel Wolfshant
Trusted Contributor

Re: RPM listing

Use a specific format for the query:
rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n'
Jees Joy
Frequent Advisor

Re: RPM listing

try issuing the command

rpm -qa | grep (package name) if you are trying for a specfick

or for all rpm -qa which will query all the packages that is installed in your machine.
dipesh_2
Regular Advisor

Re: RPM listing

hi

#rpm -qa |grep i386