Name

cal — stdin  stdout  - file  -- opt  --help  --version

Synopsis

cal [options] [month [year]]

The cal command prints a calendar—by default, the current month:

$ cal
   December 2011
Su Mo Tu We Th Fr Sa
             1  2  3
 4  5  6  7  8  9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

To print a different calendar, supply a month and four-digit year: cal 8 2011. If you omit the month (cal 2011), the entire year is printed.

Useful options

-y

Print the current year’s calendar.

-3

Three-month view: print the previous and next month as well.

-j

Number each day by its position in the year; in our example, September 1 would be displayed as 244, September 2 as 245, and so on.

Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.