Name
cal
Synopsis
cal [options
] [[month
]year
]
With no arguments, print a calendar for the current month. Otherwise, print either a 12-month calendar (beginning with January) for the given year or a one-month calendar of the given month and year. month ranges from 1 to 12; year ranges from 1 to 9999.
GNU/Linux and Mac OS X Options
-
-j
Display Julian dates (days numbered 1 to 365, starting from January 1).
-
-y
Display entire year.
GNU/Linux Options
-
-1
Print a one-month calendar. This is the default.
-
-3
Print a three-month calendar: previous month, current month, and next month.
-
-m
Display Monday as the first day of the week.
-
-s
Display Sunday as the first day of the week. This is the default.
Examples
cal 12 2007 cal 2007 > year_file
Get Unix in a Nutshell, 4th 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.