Linux and Unix cal command

Quick links

About cal
Syntax
Examples
History
Related commands
Linux and Unix main page

About cal

Calendar for the month and the year.

Syntax

cal [options] [[[day] month] year]

Description

cal originally appeared in version 6 of AT&T Unix. Since then there have been versions released for BSD, Linux, and other Unix variants. You should check your particular installation's manual for version-specific options. Listed below are the traditional syntax and options for Unix cal.

In general, if no options are given, cal displays the current month at the command line. It's a quick and convenient way to glance at the dates of the month, and can be useful as part of a login script.

Options

-1 Display a single month. This is the default.
-3 Display three months: last month, this month, and next month.
-s Display the calendar using Sunday as the first day of the week.
-m Display Monday as the first day of the week.
-j Display dates of the Julian calendar.
-y Display a calendar for the entire current year.

Examples

cal

Displays the calendar for this month.

cal 12 2000

Displays the calendar for December of the year 2000.

Related commands

calendar