Command “cal” stands for calendar.
This command is used to see the calendar of a specific month/ year or both.
The basic syntax of command “cal”.
1 | cal [month] [year] |
[month]- is used for specify month
[year] – is used for specify year
To see the calendar of current month
type “cal” command on terminal and press enter and output will be calendar of the current month
1 | $ cal [ type “cal” on terminal and press enter] |
Output:
1 2 3 4 5 6 7 | January 2018 Mo Tu Th We Fr Sa So 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 25 27 28 29 30 31 |
To see the calendar of specific month/Year [for example march 2019]
type below command in terminal.
1 | $ cal 03 2019 [ press enter] |
Output:
1 2 3 4 5 6 7 | March 2019 Mo Tu Th We Fr Sa So 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 25 27 28 29 30 31 |
To see the calendar of the specific year(all 12 months)
To see the calendar of the year 2012. Type “cal” command and attach desired year as shown below
1 | $ cal 2012 [ press enter] |
Output
In output calendar of 2012(all 12 months) will display in the terminal.