The CAL command can be used to display a Gregorian calendar. The Gregorian calendar is now the International Universal Calendar, also known as Griel, the Gregorian calendar. "Solar" is also known as "solar Calendar", the earth around the sun for one year, for the western countries are universal, it is also known as "Western Calendar".
1. command format:
C Al [Parameters ] [month] [year]
2. command function:
Used to view time information such as a calendar, such as a single argument, that represents the year (1-9999), and if there are two parameters, the month and year
3. Command parameters:
-1 shows the one month calendar
-3 Display system first one months, current month, next one month calendar
-S displays Sunday for the first day of one weeks, the default format
-M displays Monday for the first day of one weeks
-j show the day of the year (the date of the year is calculated by day, and the number of days in the current month is displayed by default from January 1)
-y Displays the calendar for the current year
4. usage Examples:
Example One: Show Current Month Calendar
command: Cal
[[email protected] ~]# cal December 123456 1 2 3 4 5 6 7 8 9 10 11 12 13 14 151 6 (2223) 2930 31[[email protected] ~]#
Example Two: displays the calendar for the specified month
command: Cal 9
[email protected] ~]# cal 9 September 123456 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1516 17 18 19 20 21 2223 24 25 26 27 28 2930
Example Three: Show 2013 Calendar
Command:
Cal-y 2013
Cal 2013
January February marchsu Mo tu we th fr sa su mo tu we th fr sa su mo tu we T H Fr Sa 1 2 3 4 5 1 2 1 2 6 7 8 9 10 11 12 3 4 5 6 7 8 9 3 4 5 6 7 8 913 14 15 16 17 18 19 10 11 12 13 14 15 16 10 11 12 13 14 15 1620 21 22 23 24 25 26 17 18 19 20 21 2 2 23 17 18 19 20 21 22 2327 28 29 30 31 24 25 26 27 28 24 25 26 27 28 29 30 April may junesu mo tu we th fr sa Su Mo tu we th fr sa Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 1 2 3 4 1 7 8 9 10 11 12 13 5 6 7 8 9 10 11 2 3 4 5 6 7 814 15 16 17 18 19 20 12 13 14 15 16 17 18 9 10 11 12 13 14 1521 22 23 24 25 26 27 19 20 21 22 23 24 25 16 17 18 19 20 21 2228 29 30 26 27 28 29 30 31 23 24 25 26 27 28 29 July August Septembersu Mo tu we th fr sa su mo tu we th fr sa su mo Tu We Th Fr Sa 1 2 3 4 5 6 1 2 3 1 2 3 4 5 6 7 7 8 9 10 11 12 13 4 5 6 7 8 9 1 0 8 9 10 11 12 13 1414 15 16 17 18 19 20 11 12 13 14 15 16 17 15 16 17 18 19 20 2121 22 23 24 25 26 27 18 19 20 The 2828 of the October November in a few of the more than a. Decembersu mo tu We th fr sa su mo tu we th fr sa su mo tu we th fr sa 1 2 3 4 5 1 2 1 2 3 4 5 6 7 6 7 8 9 10 11 12 3 4 5 6 7 8 9 8 9 10 11 12 13 1413 14 15 16 17 18 19 10 11 12 13 14 15 16 15 16 17 18 19 20 2120 21 22 23 24 25 26 17 18 19 20 21 22 23 22 23 24 25 26 27 2827 28 29 30 3 1 24 25 26 27 28 29 30 29 30 31
Example four: displays the number of days since January 1
command: cal-j
[Email protected] ~]# cal-j December two three four five six 336337 338 339 340 341 342 34334 4 345 346 347 348 349 350351 352 353 354 355 356 357358 359 360 361 362 363 364365 366[[email protected] ~]#
Example Five: Monday shows in the first column
command: cal-m
[Email protected] ~]# cal-m December 123456 1 2 3 4 5 6 7 8 910 11 12 1617 (2324) 3031[[email protected] ~]#-A.
Original address: http://www.cnblogs.com/peida/archive/2012/12/14/2817473.html
Linux common Commands (30)-Cal