LinuxCommandLibrary

calendar

Display reminders from a calendar file

TLDR

Display today and tomorrow's reminders

$ calendar
copy
Show reminders for the next N days
$ calendar -A [7]
copy
Look back N days for reminders
$ calendar -B [3]
copy
Use a specific calendar file
$ calendar -f [path/to/calendar]
copy
Show all upcoming events (no date limit)
$ calendar -a
copy
Display reminders for everyone on the system
$ calendar -a
copy
Use a specific calendar directory
$ calendar -d [path/to/calendar_dir]
copy

SYNOPSIS

calendar [-A days] [-B days] [-a] [-f calendarfile] [-d calendardir]

DESCRIPTION

calendar is a traditional Unix utility that displays reminders from a calendar file. It reads entries from ~/.calendar/calendar (or a specified file) and displays those matching today's date and optionally upcoming dates.
Calendar files contain one reminder per line in a simple format: a date followed by a tab and the reminder text. Dates can be specified in various formats including "Jan 1", "1/1", "*/15" (monthly), and day names. The program understands holidays and special date expressions.
The tool was traditionally used for system-wide announcements and personal reminders. When run with -a by root, it processes all users' calendar files and sends email notifications. Many systems include pre-installed calendar files with historical dates, holidays, and astronomical events.
Common calendar file locations include system calendars in /usr/share/calendar/ with files for holidays, history, music, and other categories. Users can include these system files in their personal calendars using #include directives.

PARAMETERS

-A days

Look ahead the specified number of days (default: 1, showing today and tomorrow).
-B days
Look back the specified number of days.
-a
Process calendar files for all users, sending mail (root only).
-f file
Use the specified file instead of ~/.calendar/calendar.
-d dir
Use the specified directory for calendar files.
-t date
Pretend today is the specified date (format: [[[cc]yy]mm]dd).
-w
Print day of the week name.

CAVEATS

Date formats vary between BSD and other implementations. The -a flag (mail to all users) requires root privileges. Some implementations have limited date parsing capabilities. Email functionality depends on a working mail system.

HISTORY

The calendar command originated in early Unix systems at Bell Labs in the 1970s. It was one of the original time-based utilities, predating cron for simple reminder functionality. The program has been included in BSD systems since the early days and remains part of many Unix-like operating systems, though its usage has declined with modern calendar applications.

SEE ALSO

cal(1), date(1), at(1), cron(8), remind(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community