2
LINUX TUTORIAL
cal
cal command
cal command is used to display the calendar.
Syntax
cal [options] [date] [month] [year]
 cal : Display the calendar of current month with highlighted date.
 cal 2050 : Display the calendar of year 2050.
 cal 3 2015 : Display the calendar of 3rd month i.e. March of year 2015.
 cal 1 3 2015 : Display the calendar of March month of year 2015 and
first day of month will be highlighted.
cal command
Note
The single argument denote the year, two arguments denote the month
and year and three arguments denote the date, month and year. For date
range should be under 1 to 31, month range should be under 1 to 12 and
for year range should be under 1 to 9999.
 cal -3 : Display the 3 month’s calendar i.e. immediate previous month,
current month and immediate next month.
cal command
 cal –s : Display Sunday as first day of the week.
 cal –m : Display Monday as first day of the week.
 cal –y : Display the entire calendar of current year without mentioning the
year.

How to use cal command in Linux

  • 1.
  • 2.
    cal command cal commandis used to display the calendar. Syntax cal [options] [date] [month] [year]  cal : Display the calendar of current month with highlighted date.  cal 2050 : Display the calendar of year 2050.  cal 3 2015 : Display the calendar of 3rd month i.e. March of year 2015.  cal 1 3 2015 : Display the calendar of March month of year 2015 and first day of month will be highlighted.
  • 3.
    cal command Note The singleargument denote the year, two arguments denote the month and year and three arguments denote the date, month and year. For date range should be under 1 to 31, month range should be under 1 to 12 and for year range should be under 1 to 9999.  cal -3 : Display the 3 month’s calendar i.e. immediate previous month, current month and immediate next month.
  • 4.
    cal command  cal–s : Display Sunday as first day of the week.  cal –m : Display Monday as first day of the week.  cal –y : Display the entire calendar of current year without mentioning the year.