Terminal Icon

atd[000000]: File is in wrong format – aborting

Recently, on my CentOS server, I had my system error log at /var/log/messages flooded with a whole heap of lines like the one below.

server01 atd[13653]: File a0001001567d06 is in wrong format – aborting

Naturally, this continued until the server ran out of disk space and died. I couldn’t work out how the issue actually originated however, I managed to fix the issue by deleting the at job that was failing.

The following commands fixed the problem for me.

First of all use atq to find out the job number.

# atq a0001001567d06

You should get a response similar to the one below. The first number is the job number you need to run the next command.

16 2012-09-04 00:38 a root

Using the job number from above, run atrm to remove the troublesome job

# atrm 16
Problem solved!

Read More

Loading .bashrc on Mac OSX

Earlier this week, I went to setup aliases on Mac OS X (Mountain Lion) and couldn’t get the terminal to read the .bashrc file. It turns out that Mac OSX loads .bash_profile instead of .bashrc.

So I spent some time searching and found out that OSX will check a few files for additional shell config

~/.bash_profile, ~/.bash_login, and ~/.profile

Note: The files are also read in the order above. If you have a .profile file and a .bash_profile, the .profile config will be ignored.

I’m used to using .bashrc for everything so to get around my habit, I just added the following lines to .bash_profile.

if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

Now, I just carry on like I always did!

I’m sure that the same .bashrc fix will apply to Lion and Snow Lepord as well.

Read More