I recently noticed a difference of the output from the “ls” command between servers so I wanted to update the package on each server to make sure I was comparing apples to apples. I knew that “ls” was part of a grouping of utilities but wasn’t sure which package. You can use the info command to find out more about a specific Linux command as shown below. Only the first paragraph is shown in the output since its pages long.
Find Out More About a Linux Command:
- File: coreutils.info, Node: ls invocation, Next: dir invocation, Up: Directory listing
- 10.1 `ls': List directory contents
- ==================================
- The `ls' program lists information about files (of any type, including
- directories). Options and file arguments can be intermixed
- arbitrarily, as usual.
Notice above in the first line of output that “coreutils.info” is referenced. This lead me to “ls” is part of the coreutils package which I then upgraded as shown below.
Upgrade coreutils on Linux:
- [root@idev config]# yum update coreutils
- Loading "installonlyn" plugin
- Setting up Update Process
- Setting up repositories
- Reading repository metadata in from local files
- Resolving Dependencies
- --> Populating transaction set with selected packages. Please wait.
- ---> Downloading header for coreutils to pack into transaction set.
- coreutils-5.97-19.el5.x86 100% |=========================| 60 kB 00:00
- ---> Package coreutils.x86_64 0:5.97-19.el5 set to be updated
- --> Running transaction check
- Dependencies Resolved
- =============================================================================
- Package Arch Version Repository Size
- =============================================================================
- Updating:
- coreutils x86_64 5.97-19.el5 base 3.5 M
- Transaction Summary
- =============================================================================
- Install 0 Package(s)
- Update 1 Package(s)
- Remove 0 Package(s)
- Total download size: 3.5 M
- Is this ok [y/N]: y
- Downloading Packages:
- (1/1): coreutils-5.97-19. 100% |=========================| 3.5 MB 00:12
- Running Transaction Test
- Finished Transaction Test
- Transaction Test Succeeded
- Running Transaction
- Updating : coreutils ######################### [1/2]
- Cleanup : coreutils ######################### [2/2]
- Updated: coreutils.x86_64 0:5.97-19.el5
- Complete!
So to upgrade “ls” you need to update the coreutils RPM package which can be done using “yum” as shown above.