Archive for 'Linux Utilities'

Figuring out if a Linux executable supports a configuration directive

While debugging a problem last week I needed to quickly see if a version of bind supported the edns-udp-size configuration directive. Since RHEL3, RHEL4 and RHEL5 ship with different releases of Bind, I needed to see when this directive was introduced (EDNS was introduced in Bind 9, and the directive appears to have been there [...]

Viewing the differences between two directories on Linux servers

This past week I needed to compare the contents of two directories to see if there were any differences. There are a TON of ways to do this, though my preferred way is to use diff with the “-r” (when comparing directories do so recursively) option to compare two folders: $ find foo1 foo1 foo1/services2 [...]

Conditionally restarting Linux services

Periodically I need to start a service, but only if it’s not currently running. Other times I need to restart services on a machine, but only if they are currently running. Services may have been started on the system at boot, manually by an admin, or through a systems wide management infrastructure. They may also [...]

Retrieving a bunch of files with wget

I periodically need to retrieve new CentOS and Fedora releases. Sometimes I need to snag CDs (I still support machines without DVD drives), and in other cases I need DVDs. Typically when I’m playing around with new releases I grab both, and use the wget to retrieve them all at once. If you pass wget [...]

Locating your Dell service tag without openmanage

Dell provides the openmanage suite of tools to monitor and report on the hardware in their servers. I’ve managed a few hosts in the past where openmanage wasn’t installed, and I needed to locate the service tag so I could get the hardware in the server serviced. Luckily for me the dmidecode utility was installed, [...]

Printing the current sector size of a device in Linux

In the past year, a number of disk drives started shipping with 4K sector sizes. To see if your disk drive is using 512-byte or 4K sectors, you can use the blktool utility to print the sector size of a device: $ blktool /dev/sda sector-sz 512 You can also look at the hw_sector_size value for [...]

« Older Entries   Recent Entries »