Unix cal command: a key part of my calendaring solution
I noticed both Tim Bray and John Roberts‘ recent ruminations on the perfect calendar solution, and while I don’t have the answer, in thinking about it I realized that I have a quirky calendar-related habit that has stuck with me for over a decade, throughout all my own various experiments with Palm Desktop, Outlook, iCal, etc. On a daily basis, I use the Unix cal command to help schedule my life. I don’t know what I would do without it.
When looking at broad swaths of time (say, a whole year), nothing beats the good ol’ cal command for quickly giving you a lay of the land when you’re making scheduling decisions far in advance (for conferences, vacations, etc.) Just type “cal 2006″ and you’ve got the whole year laid out before you:

Of course, the Unix cal command is a read-only environment, so once I determine whether a particular date works for whatever I’m doing, I have to put my commitment on a writeable calendar somewhere — but I still couldn’t do without my cal.
Anyone else out there do this?
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
Comments
I once inherited a bit of Web code that shelled out to run cal and parsed the result in order to build a calendar page for a given month. I was surprised at how well it worked (and how much code I had to write to do the same thing without shelling out.)
Calendars are hard, and cal does them well.
Now that you mention it, I’m pretty sure I wrote some code a long time ago that did just that (i.e. the shell out to cal and parsing).
I’m not a C programmer (and not that interested in become one at this point), but I’m guessing the cal source code is either amazingly elegant or the hack to beat all hacks.
I didn’t know the cal command even existed… Never done much in Unix. That’s one reason I read other people’s blogs on a regualr basis!
Works great in OS X terminal. I noticed that to view 2006 data you need to say cal 07… I had to type cal 06 twice to realize i was looking at ‘05 data. This of course makes sense but it did surprise me the first time.
Hey Chad,
I have this calendar concept rolling around in my head… I’ve been talking with bradley and a ton of others about it. I’d like to run it by you when you have a moment, I’ll ping ya soon.
Yes, guilty too.
One of the nice things about the Mac’s transformation to Unix under the hood is that it now comes with cal support built in! :)
Cal is very useful. I like it too.
If you need a cli program for dates and appointments
you can use ‘when’. Perhaps now you don’t need separate paper calendars anymore.
http://www.lightandmatter.com/when/when.html
Another program i can recommend is DevTodo.
It has nothing to do with calendars, but i find it extremly useful.
Think of you have to clean up a directory.
When you enter it - DevTodo can remember you to do it!
It saves directory dependent todo lists.
I run GeekTool on OS X. This allows me to run the output of terminal commands as part of the “desktop background”. Also, I disabled all Finder Icons on the desktop background using a utility called “Cocktail”. You can then have some logs to always run on your desktop, and also the output of “cal -y”. I would like to use a more modern version that also has the -m option (my weeks start on Monday), and Apple only includes an 1994 version of the cal command.
Another useful one I use in Ubuntu or it just comes with gnome I think…
zenity –calendar
pops up a calendar for the current month but you can click around by month and by year.
Why in AIX does my cal 2007 command only give me my calendar with 2 months across instead of 3. I want it 3 months across. Can anyone help?

Completely guilty of same behavior - still do it on my mac when I’m in the Darwin terminal window too.