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: cal [Parameters ] [month] [year]2. Command function: Used to view time information such as a calendar, such as only one parameter, indicates the year (1-9999), if there are two parameters, it represents the month and year3. Command parameters:-1Show calendar for one months-3Display System One month, current month, next one months calendar-s shows Sunday for the first day of one weeks, the default format-m shows Monday for the first day of one weeks-J Displays the day of the Year in the year (the date of the month is counted , from January 1, and the number of days in the year is displayed by default)-y Displays the calendar for the current year4. Usage Example: Instance 1: Display the current month calendar command: Cal output: [[email protected]~]# Cal December -Day 1234561 2 3 4 5 6 7 8 9 Ten One A - - the - - - + - + A at - - - - - in - to[[Email protected] ~] #实例2: Displays the calendar command for the specified month: Cal9 -output: [[email protected]~]# Cal9 -September -Day 1234561 2 3 4 5 6 7 8 9 Ten One A - - the - - - + - + A at - - - - - in -Example 3: Display the 2013 calendar command: Cal-Y -Cal -Output: Instance 4: Number of days displayed since January 1 command: Cal-J Output: [[email protected]~]# Cal-J December -Day 123456336337 338 339 340 341 342 343344 345 346 347 348 349 -351 352 353 354 355 356 357358 359 the 361 362 363 364365 366[[Email protected] ~] #实例5: Monday is shown in the first column of the command: Cal-m output: [[email protected]~]# Cal-m December -123456 Days1 2 3 4 5 6 7 8 9Ten One A - - the - - - + - + A at - - - - - in - to[Email protected] ~]#
Linux Command learning Note: Cal command