Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
72 lines (56 loc) · 1.53 KB

File metadata and controls

72 lines (56 loc) · 1.53 KB
Copy raw file
Download raw file
Outline
Edit and raw actions

cal

显示当前日历或指定日期的日历

补充说明

cal命令 用于显示当前日历,或者指定日期的日历。

语法

cal(选项)(参数)

选项

-l:显示单月输出;
-3:显示临近三个月的日历;
-s:将星期日作为月的第一天;
-m:将星期一作为月的第一天;
-j:显示“julian”日期;
-y:显示当前年的日历。

参数

月:指定月份;
年:指定年份。

实例

单独执行cal命令会打印出日历:

[root@localhost ~]# cal
    十二月 2013     
日 一 二 三 四 五 六
 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
[root@localhost ~]# cal -j
        十二月 2013        
  日   一   二   三   四   五   六
335 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
[root@localhost ~]# cal -3
    十一月 2013           十二月 2013            一月 2014      
日 一 二 三 四 五 六  日 一 二 三 四 五 六  日 一 二 三 四 五 六
                1  2   1  2  3  4  5  6  7            1  2  3  4
 3  4  5  6  7  8  9   8  9 10 11 12 13 14   5  6  7  8  9 10 11
10 11 12 13 14 15 16  15 16 17 18 19 20 21  12 13 14 15 16 17 18
17 18 19 20 21 22 23  22 23 24 25 26 27 28  19 20 21 22 23 24 25
24 25 26 27 28 29 30  29 30 31              26 27 28 29 30 31  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.