oreilly.comSafari Books Online.Conferences.


Managing Appointments
Pages: 1, 2

Including other calendar files

The calendar package comes with several calendar files, stored in /usr/share/calendar, containing dates for many different occasions:


Births and deaths of famous people.


Christian holidays.

Significant dates in the history of computing.


Dates of US historical events.

Standard and obscure holidays.


Jewish holidays.

Dates related to music, mostly 60s rock.


US holidays.


Hindu holidays.

To have calendar output dates from one of these files, put the following in your calendar file:

#include <filename>

where filename is the name of the calendar file.

For example, to output both US holidays and famous births and deaths when you run calendar, put these lines somewhere in your calendar file:

#include <calendar.usholiday>
#include <calendar.birthday>

And, of course, you can share your own calendar files with other users; this is useful for making special calendars for a group or organization. If the calendar file is in the current directory or /usr/share/calendar, you can just give the file name; otherwise, give its full path name in the include statement.

Automatic reminders

If you run the bash shell, you can put calendar in your .bashrc file to output the day's reminders every time you log in or start a new shell.

If you keep your calendar file in a directory other than your home directory, make sure that calendar is called from that directory. For example, if your calendar file is in your ~/doc/etc directory, you'd put the following in your .bashrc file:

cd ~/doc/etc; calendar; cd

Next week: Contact manager tools under Linux.

Michael Stutz was one of the first reporters to cover Linux and the free software movement in the mainstream press.

Read more Living Linux columns.

Linux Online Certification

Linux/Unix System Administration Certificate Series
Linux/Unix System Administration Certificate Series — This course series targets both beginning and intermediate Linux/Unix users who want to acquire advanced system administration skills, and to back those skills up with a Certificate from the University of Illinois Office of Continuing Education.

Enroll today!

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: