I'd like to know how many binary and source packages Red Hat provides with their current RHEL 6.4 Release.
1 Answer
For the record, there is no easy way to get the number of packages in RHEL. As Nils and vonbrand pointed out, it is important to say, that it does not say anything about the distribution and that there are a lot of additional channels/repos in RHEL.
Nevertheless, to answer the orignal question, this is what I came up with (run on a RHEL 6.4 system):
Binary packages:
yum list | egrep "(rhel-x86_64-server-6|RedHatEnterpriseLinux)" | wc -l
--> 3742 packages
Source packages:
wget -q -O - http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/ | grep 'src.rpm' | perl -p -e 's,.*href="([a-zA-Z0-9-_.+]+?)-[0-9].*".*,$1,' | sort -u | wc -l
--> 2187 packages
yum list > package-list.txt
, then count lines of the file?wget -q -O - http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/ | grep 'src.rpm' | perl -p -e 's,.*href="([a-zA-Z0-9-_.+]+?)-[0-9].*".*,$1,' | sort -u | wc -l