Useful crontab short cuts

While reading through crontab(5) this morning I came across this useful nugget of information:

“These special time specification “nicknames” are supported, which replace the 5 initial time and date fields, and are prefixed by the @ character:

@reboot : Run once, at startup.
@yearly : Run once a year, ie. “0 0 1 1 *”.
@annually : Run once a year, ie. “0 0 1 1 *”.
@monthly : Run once a month, ie. “0 0 1 * *”.
@weekly : Run once a week, ie. “0 0 * * 0”.
@daily : Run once a day, ie. “0 0 * * *”.
@hourly : Run once an hour, ie. “0 * * * *”.”

So instead of writing:

0 * * * * command

You can specify hourly to accomplish the same thing:

@hourly command_to_run

Or if you want to run something when a machine is rebooted you can add this:

@reboot echo “” | mail -s “`/bin/hostname` was recently rebooted” root

Several of these short cuts are rather handy and it makes things easier to read IMHO. Gotta love short cuts!

How to expand you technical book library on the cheap

I recently got the opportunity to start supporting a number of AIX systems, and being an AIX newbie the first thing I did was ask myself how can I learn everything there is to know about AIX (more to come on this topic tomorrow)? Being a readaholic, I decided to wander over to Amazon to see which AIX books were available.

After 10 minutes of searching and reading reviews, I ended up snagging a copy of AIX 5L Administration for $5. That $5 also included shipping! This led me to start looking at the “used” link associated with various other books I really wanted, and the used prices were typically at least 50% off the price Amazon lists for a new book (the book I got was unused, which is new to me!). This may be old news to everyone else, but I like the fact that I can now expand my technical library on the cheap! Thought I would pass this on to my fellow geeks.

Getting VMWare tools to configure on Solaris 10 guests

I built out a Solaris 10 update 10 guest on a vSphere 4.1 machine this past week. When I went to configure VMWare tools I received the following error:

$ /usr/bin/vmware-config-tools.pl

Initializing...

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done
   Guest memory manager:                                               done


Unable to create symlink "/mnt/hgfs" pointing to file "/hgfs".

Execution aborted.

After doing some debugging I noticed that /mnt is used temporarily and if you happen to be using it (or if volfs is) the installer will fail. I temporarily stopped volfs and unmounted a device that was mounted on /mnt and the installer completed without issue. Figure I would share this with others so you don’t have to waste your time debugging this problem.