Earlier today I ran into an issue where I needed an updated version of “sort” on a server running CentOS 5.4. Since sort is not a package available via yum I needed to first find out what Linux RPM package includes sort to see if there was an upgrade available. To find this out you can use yum as shown in the example below.
Find Out What RPM Package Installs Sort On Linux:
- [root@dev ~]# yum whatprovides *bin/sort*
- Loaded plugins: allowdowngrade, fastestmirror
- Determining fastest mirrors
- * addons: mirrors.rit.edu
- * base: hpc.arc.georgetown.edu
- * updates: mirrors.netdna.com
- addons 100% |=========================| 951 B 00:00
- addons/primary 100% |=========================| 202 B 00:00
- base 100% |=========================| 2.1 kB 00:00
- base/primary_db 100% |=========================| 1.6 MB 00:03
- updates 100% |=========================| 1.9 kB 00:00
- updates/primary_db 100% |=========================| 451 kB 00:00
- addons/filelists 100% |=========================| 195 B 00:00
- base/filelists_db 100% |=========================| 3.4 MB 00:04
- updates/filelists_db 100% |=========================| 1.7 MB 00:01
- coreutils-5.97-23.el5_4.2.i386 : The GNU core utilities: a set of tools commonly used in shell scripts
- Repo : base
- Matched from:
- Filename : /bin/sort
- coreutils-5.97-23.el5_4.2.i386 : The GNU core utilities: a set of tools commonly used in shell scripts
- Repo : installed
- Matched from:
- Filename : /bin/sort
- [root@dev ~]#
As you can see from the above output the sort command is included in the RPM package called coreutils package from the CentOS base repository. Currently the installed version, which is coreutils-5.97-23.el5_4.2.i386, is the latest coreutils version available on CentOS 5.4 so you would have to look at upgrading coreutils outside of yum to get a newer version of sort.
Other Applications Included In coreutils RPM Package On CentOS:
- /bin/arch
- /bin/basename
- /bin/cat
- /bin/chgrp
- /bin/chmod
- /bin/chown
- /bin/cp
- /bin/cut
- /bin/date
- /bin/dd
- /bin/df
- /bin/echo
- /bin/env
- /bin/false
- /bin/link
- /bin/ln
- /bin/ls
- /bin/mkdir
- /bin/mknod
- /bin/mktemp
- /bin/mv
- /bin/nice
- /bin/pwd
- /bin/readlink
- /bin/rm
- /bin/rmdir
- /bin/sleep
- /bin/sort
- /bin/stty
- /bin/su
- /bin/sync
- /bin/touch
- /bin/true
- /bin/uname
- /bin/unlink
- /sbin/runuser
- /usr/bin/[
- /usr/bin/base64
- /usr/bin/chcon
- /usr/bin/cksum
- /usr/bin/comm
- /usr/bin/csplit
- /usr/bin/cut
- /usr/bin/dir
- /usr/bin/dircolors
- /usr/bin/dirname
- /usr/bin/du
- /usr/bin/env
- /usr/bin/expand
- /usr/bin/expr
- /usr/bin/factor
- /usr/bin/fmt
- /usr/bin/fold
- /usr/bin/groups
- /usr/bin/head
- /usr/bin/hostid
- /usr/bin/id
- /usr/bin/install
- /usr/bin/join
- /usr/bin/logname
- /usr/bin/md5sum
- /usr/bin/mkfifo
- /usr/bin/nl
- /usr/bin/nohup
- /usr/bin/nproc
- /usr/bin/od
- /usr/bin/paste
- /usr/bin/pathchk
- /usr/bin/pinky
- /usr/bin/pr
- /usr/bin/printenv
- /usr/bin/printf
- /usr/bin/ptx
- /usr/bin/readlink
- /usr/bin/runcon
- /usr/bin/seq
- /usr/bin/sha1sum
- /usr/bin/sha224sum
- /usr/bin/sha256sum
- /usr/bin/sha384sum
- /usr/bin/sha512sum
- /usr/bin/shred
- /usr/bin/shuf
- /usr/bin/split
- /usr/bin/stat
- /usr/bin/stdbuf
- /usr/bin/sum
- /usr/bin/tac
- /usr/bin/tail
- /usr/bin/tee
- /usr/bin/test
- /usr/bin/timeout
- /usr/bin/tr
- /usr/bin/truncate
- /usr/bin/tsort
- /usr/bin/tty
- /usr/bin/unexpand
- /usr/bin/uniq
- /usr/bin/users
- /usr/bin/vdir
- /usr/bin/wc
- /usr/bin/who
- /usr/bin/whoami
- /usr/bin/yes
- /usr/sbin/chroot
There are many applications included with the coreutils package on Linux. If you need to upgrade any of them you should look at how to upgrade the coreutils package if possible because he chances are your distro does not have the latest version of coreutils in the Linux distros package manager.