Unix is a multi-user, multi-tasking operating system that was initially developed by Bell Labs in the 1970s. Various similar operating systems that are POSIX compliant (ie compatible with Unix) have since been developed (POSIX is an abbreviation for Portable Operating System Interface for UNIX). These include the following: the BSD family (OpenBSD, FreeBSD, NetBSD, Mac OS/X), Solaris, IRIX, AIX, SunOS, UnixWare, OpenServer and Linux.
Software written for POSIX compliant operating systems is generally able to be compiled for all POSIX platforms with little or no platform-specific changes. This makes the commands and utilities available for this extended family of operating systems very similar, and there are few differences between administering them.
The articles in this section are about useful command line utilities and commonly used application software on POSIX compliant operating systems. For Mac OSX specific articles see my OSX section.
So you need to put a tab on the command line when using BASH on Linux, Mac, BSD? How to do it? The tab character is usually used for command completion etc so typing in a tab won't render one on the command line.
The Dag RPM Repository contains a collection of RPM packages for Red Hat Enterprise Linux, CentOS, Fedora and others which are not included in the base installation/libraries for those Linux distributions. If you get an error message similar to the one shown below when attempting to install an RPM package from the Dag RPM Repository, then you need to install the Dag GPG keys:
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 6b8d79e6 Public key for jigdo-0.7.3-1.el4.rf.i386.rpm is not installed
Update June 29th 2009: I received an email today from someone having issues following the instructions below because the URL in the example is no longer valid. I’ve updated the URL and made it a little clearer it’s an example.
One thing I’ve noticed from re-reading this post and the Dag RPM Repoistory page, is that the instructions here are for adding the Dag RPM Repository and not just the GPG key. I’m not sure if something’s changed since I wrote this post originally but in any case following the instructions here will both add the repository and add the GPG keys, so if you are experiencing the above error it should fix it.
Installation of the GPG keys is simple. Go to the Dag RPM Repository FAQ page and look at the section titled “How to configure to use RPMforge”. This contains a list of the GPG keys by Linux distribution, version and platform, and the commands you need to run to install them.
To install, running the command
rpm -Uhv [appropriate file goes here]
For example, if you had a CentOS 5 x86_64 or Red Hat Enterprise Linux 5 x86_64 install that you wanted to install the GPG keys to, you would use the Red Hat Enterprise Linux 5 / x86_64 GPG key like so:
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
And that’s all there is to it. You will now be able to install from the Dag RPM Repository, and will no longer receive the error message at the top of this post.
While trying to troubleshoot why email wasn’t being delivered to one of my mail aliases on a new server this morning, I discovered a nifty little trick for testing the deliverability of an email address using exim from the command line.
The find command is really useful for locating files and directories etc on *nix and Mac. I recently needed to find all files greater than 1MB but it wasn’t all that clear how to do this from the find man page so I’ve written this post to show how to do it.
I recently posted a Subversion Command Line Script to export changed files and in response to a comment on that page have posted a new version here, which writes out the current revision number to a file and only exports from that revision when the script is run again.
If you are connecting to a remote server from the Mac OS X terminal and get the message "Error opening terminal: xterm-color" when doing certain operations on the remote server, then you either change your terminal’s declaration setting or add a TERM declaration to the bash profile on the server at the other end to prevent the error message from happening. There may be other ways to solve it at the server end but this post shows a quick and easy fix.
Sometimes a script may need to only be run as root or using sudo, or run ensuring that it is not being run by root or using sudo. This quick post shows how to check if it’s the root user and exit the script.