Linux Base command (pdf) Cal command

Source: Internet
Author: User

The CAL command can be used to display Gregorian calendar calendars. The Gregorian calendar is now the International Universal Calendar, also known as Griel, the Gregorian calendar. "Gregorian Calendar" also known as "Taiyangli", the Department of the Earth around the sun for one year, for the western countries, it is also known as "Western Calendar".

1. Command format:

Cal [parameters] [month] [year]

2. Command function:

Used to view time information such as calendars, such as only one parameter, the year (1-9999), or the month and year if there are two parameters

3. Command parameters:

-1 shows a one month calendar

-3 display system before one months, current month, next one month calendar

-S shows Sunday as the first day of one weeks, the default format

-M shows Monday as the first day of one weeks

-J display in the year of the first days (one year date by day, starting from January 1, the default display of the current month in the number of days in a year)

-y Displays the calendar for the current year

4. Use instance:

Example 1: Display the current month calendar

Command:

Cal

Output:

[Root@localhost ~]# Cal

December 2012

Day 123456

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 26 27 28 29

31[root@localhost ~]#

Example 2: Displays the calendar for the specified month

Command:

Cal 9 2012

Output:

[Root@localhost ~]# Cal 9 2012

September 2012

Day 123456

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 26 27 28 29

30

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.