XK8ER
asked on
version of service
hello there,
there is a service installed on centos v5.6 64bit
I would like to see the version and if its 64bit.. how can I do that?
there is a service installed on centos v5.6 64bit
I would like to see the version and if its 64bit.. how can I do that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Wesly,
Curious, why all extra formatting stuff? I have never seen it done that way, just wondering what the reason is behind it.
If you know for example the name of the init script, you can just do
Curious, why all extra formatting stuff? I have never seen it done that way, just wondering what the reason is behind it.
If you know for example the name of the init script, you can just do
rpm -qf filename
[root@broken ~]# rpm -qf /etc/init.d/httpd
httpd-2.2.15-5.el6.centos.x86_64
You have the setting in ~/.rpmmacros to show %%{arch} as I mentioned in the first post.
Otherwise, you won't see .x86_64
Otherwise, you won't see .x86_64
[root@broken ~]# cat ~/.rpmmacros
cat: /root/.rpmmacros: No such file or directory
[root@broken ~]# locate .rpmmacros
[root@broken /]# find . -name .rpmmacros -type f
[root@broken /]#
cat: /root/.rpmmacros: No such file or directory
[root@broken ~]# locate .rpmmacros
[root@broken /]# find . -name .rpmmacros -type f
[root@broken /]#
[root@broken rpm]# pwd
/usr/lib/rpm
[root@broken rpm]# head macros
#/*! \page config_macros Default configuration: /usr/lib/rpm/macros
# \verbatim
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
# should be added to /etc/rpm/macros, while per-user configuration should
# be added to ~/.rpmmacros.
which Linux distribution do you have?
I tested on my CentOS 5.x.
Without setting in rpmmacros, it won't show %%{arch} by default.
--------
# cat ~/.rpmmacros
%_query_all_fmt %%{name}-%%{version}-%%{re lease}.%%{ arch}
# mv /root/.rpmmacros /root/.rpmmacros_old
# rpm -qf /etc/init.d/httpd
httpd-2.2.3-53.el5.centos. 1
# mv /root/.rpmmacros_old /root/.rpmmacros
# rpm -qf /etc/init.d/httpd
httpd-2.2.3-53.el5.centos. 1.i386
I tested on my CentOS 5.x.
Without setting in rpmmacros, it won't show %%{arch} by default.
--------
# cat ~/.rpmmacros
%_query_all_fmt %%{name}-%%{version}-%%{re
# mv /root/.rpmmacros /root/.rpmmacros_old
# rpm -qf /etc/init.d/httpd
httpd-2.2.3-53.el5.centos.
# mv /root/.rpmmacros_old /root/.rpmmacros
# rpm -qf /etc/init.d/httpd
httpd-2.2.3-53.el5.centos.
CentOS 6
I don't recall having to do that on 5.x either... let me check some RHEL5's at work
I don't recall having to do that on 5.x either... let me check some RHEL5's at work
On CentOS 5.x
# grep query_all_fmt /usr/lib/rpm/macros
%_query_all_fmt %%{name}-%%{version}-%%{re lease}
# grep query_all_fmt /usr/lib/rpm/macros
%_query_all_fmt %%{name}-%%{version}-%%{re
[user@phx1mmail1 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
[user@phx1mmail1 ~]$ grep query_all_fmt /usr/lib/rpm/macros
%_query_all_fmt %%{name}-%%{version}-%%{release}
[root@broken rpm]# grep query_all_fmt macros
%_query_all_fmt %%{nvra}
[root@broken rpm]# grep nvra !$
grep nvra macros
%_query_all_fmt %%{nvra}
[root@broken rpm]# cat /etc/redhat-release
CentOS Linux release 6.0 (Final)
Not sure what nvra is, and I'm not doing the research right this sec... stupid busy day at work... I hate computers ;)
Always learn new stuff on EE ;)
> what nvra is
Name Version Release Arch
new stuff in RHEL6.x
Name Version Release Arch
new stuff in RHEL6.x
> what nvra is
Name Version Release Arch
new stuff in RHEL6.x
Hah.. duh... in hindsight that seems so obvious. I'm definitely burnt out for the day...
ASKER
wonderful.. thanks so much!
$ rpm -q --qf "%{n}-%{v}-%{r}.%{arch}\n" vim-common
vim-common-7.0.109-3.el5.3