Linux Command learning Note: Cal command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.