{"id":479,"date":"2019-04-17T23:32:01","date_gmt":"2019-04-17T15:32:01","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=479"},"modified":"2019-04-17T23:34:00","modified_gmt":"2019-04-17T15:34:00","slug":"cal","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/cal","title":{"rendered":"cal\u547d\u4ee4 – \u663e\u793a\u65e5\u5386"},"content":{"rendered":"\n

cal\u547d\u4ee4\u7684\u540d\u5b57\u6765\u81ea\u82f1\u8bed\u5355\u8bcd\u201cCalendar\u201d\u3002\u6539\u547d\u4ee4\u7528\u6765\u663e\u793a\u5f53\u524d\u65e5\u5386\uff0c\u6216\u8005\u6307\u5b9a\u65e5\u671f\u7684\u516c\u5386\uff08\u516c\u5386\u662f\u73b0\u5728\u56fd\u9645\u901a\u7528\u7684\u5386\u6cd5\uff0c\u53c8\u79f0\u683c\u5217\u5386\uff0c\u901a\u79f0\u9633\u5386\u3002\uff09\u5982\u53ea\u6709\u4e00\u4e2a\u53c2\u6570\uff0c\u5219\u8868\u793a\u5e74\u4efd(1-9999)\uff0c\u5982\u6709\u4e24\u4e2a\u53c2\u6570\uff0c\u5219\u8868\u793a\u6708\u4efd\u548c\u5e74\u4efd \u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>cal [\u53c2\u6570] [\u6708\u4efd] [\u5e74\u4efd] <\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-l<\/td>\u5355\u6708\u5206\u8f93\u51fa\u65e5\u5386<\/td><\/tr>
-3<\/td>\u663e\u793a\u6700\u8fd1\u4e09\u4e2a\u6708\u7684\u65e5\u5386<\/td><\/tr>
-s<\/td>\u5c06\u661f\u671f\u5929\u4f5c\u4e3a\u6708\u7684\u7b2c\u4e00\u5929<\/td><\/tr>
-m<\/td>\u5c06\u661f\u671f\u4e00\u4f5c\u4e3a\u6708\u7684\u7b2c\u4e00\u5929<\/td><\/tr>
-j<\/td>\u663e\u793a\u5728\u5f53\u5e74\u4e2d\u7684\u7b2c\u51e0\u5929\uff08\u5112\u7565\u65e5\uff09<\/td><\/tr>
-y<\/td>\u663e\u793a\u5f53\u5e74\u7684\u65e5\u5386<\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u663e\u793a\u5f53\u524d\u6708\u4efd\u7684\u65e5\u5386\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cal
\u56db\u6708 2019
\u65e5 \u4e00 \u4e8c \u4e09 \u56db \u4e94 \u516d
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 <\/pre>\n\n\n\n

\u663e\u793a\u8fd1\u671f\u4e09\u4e2a\u6708\u7684\u65e5\u5386(\u5f53\u524d\u6708\uff0c\u4e0a\u4e00\u4e2a\u6708\u548c\u4e0b\u4e00\u4e2a\u6708)\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cal -3
\u4e09\u6708 2019 \u56db\u6708 2019 \u4e94\u6708 2019
\u65e5 \u4e00 \u4e8c \u4e09 \u56db \u4e94 \u516d \u65e5 \u4e00 \u4e8c \u4e09 \u56db \u4e94 \u516d \u65e5 \u4e00 \u4e8c \u4e09 \u56db \u4e94 \u516d
1 2 1 2 3 4 5 6 1 2 3 4
3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11
10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18
17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25
24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31
31
<\/pre>\n\n\n\n

\u663e\u793a\u6307\u5b9a\u5e74\u6708\u7684\u65e5\u5386\uff0c\u5982\u663e\u793a2020\u5e742\u6708\u7684\u65e5\u5386\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cal 2 2020
\u4e8c\u6708 2020
\u65e5 \u4e00 \u4e8c \u4e09 \u56db \u4e94 \u516d
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<\/pre>\n","protected":false},"excerpt":{"rendered":"

cal\u547d\u4ee4\u7684\u540d\u5b57\u6765\u81ea\u82f1\u8bed\u5355\u8bcd\u201cCalendar\u201d\u3002\u6539\u547d\u4ee4\u7528\u6765\u663e\u793a\u5f53\u524d\u65e5\u5386\uff0c\u6216\u8005\u6307\u5b9a\u65e5\u671f\u7684\u516c\u5386\uff08\u516c\u5386\u662f\u73b0\u5728\u56fd\u9645\u901a […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/479"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=479"}],"version-history":[{"count":8,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/479\/revisions"}],"predecessor-version":[{"id":789,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/479\/revisions\/789"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}