Mac Terminal Displays calendar information command

Source: Internet
Author: User

This article introduces the MAC terminal display calendar Information command, provides a number of examples to illustrate the use of these two commands and the application of each parameter scenarios.

Mac system built-in commands for displaying calendars are CALs and ncal, which make it easy to view calendar information directly on the terminal, such as when some servers do not have a graphical interface installed, and can view the calendar at the command line.

Some of the parameters are used differently from Linux, but most are generic.

command format:

usage:cal [-JY] [[month] year]
       cal [-j] [M month] [year]
       ncal [-jjpwy] [s country_code] [[month] year]
       ncal [-jeo] [Year]


Example:

1. Show Month calendar

Cal

2. Show Month calendar is the day ordinal of the current year

Cal-j

3. Display the current year calendar

Cal-y

4. Display the calendar for the specified month

Cal 1 2019

5. Vertical arrangement of calendars

Ncal

6. Show this week is the first few weeks

Ncal-w

7. Show Country Code

Ncal-p

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.