Linux cal command displays calendar

Source: Internet
Author: User

The Linux calendar is very powerful and the command is: Cal

1. Command format:

Cal [Options] [[[Day] month] year]

Cal [parameters] [month] [year]

2. Parameters:

-1, show one month calendar default for the current month

[email protected] stu]# cal-1

December 2016

Su Mo Tu We Th Fr Sa

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 31

-3, Display 3 month calendar, respectively: One months, month and next one months


[Email protected] stu]# cal-3

November December January 2017

Su 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 3 1 2 3 4 5 6 7

6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14

13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21

20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28

27 28 29 30 25 26 27 28 29 30 31 29 30 31

-S, show Sunday as the first column

[Email protected] stu]# cal-s

December 2016

Su Mo Tu We Th Fr Sa

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 31

-M, show Monday as the first column

[Email protected] stu]# cal-s

December 2016

Su Mo Tu We Th Fr Sa

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 31

-j, showing the number of days since January 1

[Email protected] stu]# cal-s

December 2016

Sun Mon Tue Wed Thu Fri Sat

336 337 338

339 340 341 342 343 344 345

346 347 348 349 350 351 352

353 354 355 356 357 358 359

360 361 362 363 364 365 366

-Y, displays the calendar for a year

Usage: Cal-y 2013


[Email protected] stu]# Cal-y 2013

2013


January February March

Su 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

6 7 8 9 10 11 12 3 4 5 6 7 8 9 3 4 5 6 7 8 9

13 14 15 16 17 18 19 10 11 12 13 14 15 16 10 11 12 13 14 15 16

20 21 22 23 24 25 26 17 18 19 20 21 22 23 17 18 19 20 21 22 23

27 28 29 30 31 24 25 26 27 28 24 25 26 27 28 29 30

31

April May June

Su 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 8

14 15 16 17 18 19 20 12 13 14 15 16 17 18 9 10 11 12 13 14 15

21 22 23 24 25 26 27 19 20 21 22 23 24 25 16 17 18 19 20 21 22

28 29 30 26 27 28 29 30 31 23 24 25 26 27 28 29

30

July August September

Su 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 10 8 9 10 11 12 13 14

14 15 16 17 18 19 20 11 12 13 14 15 16 17 15 16 17 18 19 20 21

21 22 23 24 25 26 27 18 19 20 21 22 23 24 22 23 24 25 26 27 28

28 29 30 31 25 26 27 28 29 30 31 29 30


October November December

Su 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 14

13 14 15 16 17 18 19 10 11 12 13 14 15 16 15 16 17 18 19 20 21

20 21 22 23 24 25 26 17 18 19 20 21 22 23 22 23 24 25 26 27 28

27 28 29 30 31 24 25 26 27 28 29 30 29 30 31



Linux cal command displays calendar

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.