2019-04-21 11:50:48 +08:00

44 lines
1.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="cal">cal</h1>
<p>显示当前日历或指定日期的日历</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>cal命令</strong> 用于显示当前日历,或者指定日期的日历。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">cal(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-l显示单月输出
-3显示临近三个月的日历
-s将星期日作为月的第一天
-m将星期一作为月的第一天
-j显示“julian”日期
-y显示当前年的日历。</code></pre>
<h3 id="参数">参数</h3>
<pre><code class="language-bash">月:指定月份;
年:指定年份。</code></pre>
<h3 id="实例">实例</h3>
<p>单独执行cal命令会打印出日历</p>
<pre><code class="language-bash">[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</code></pre>
<pre><code class="language-bash">[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</code></pre>
<pre><code class="language-bash">[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 </code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->