What is Cal Command ?
cal command stands for calendar, which is used to display the calendar information such as month or whole year.
syntax: cal [option] [[day][month][year]]
option:
-l:- display the single month
–3:- display the three month (previous,present,next)
–s:- display the calendar using sunday as the first day of the week
-m:- display the monday as the first day of the week
-j:- display the julian calendar
–y:- display the calendar for the year current year
-l:- display the single month
–3:- display the three month (previous,present,next)
–s:- display the calendar using sunday as the first day of the week
-m:- display the monday as the first day of the week
-j:- display the julian calendar
–y:- display the calendar for the year current year
d=date b=month y=year D=date B=month Y=year
Example of cal command in linux
1)Display date in this format 26 january 2019
Syntax: date +\”%d %B %Y\”
Capital letter indicates full name of month or year
2)Display calendar of 2018 with march month
Syntax: cal 3 2018