返回命令列表

Linux command

cal 命令

趣味

Copy it and replace filenames, paths, or keywords as needed.

命令示例

Example

cal

Example

cal -3

Example

cal -y

Example

cal -Y

Example

cal -m

Example

cal [year]

Example

cal [month] [year]

说明

cal displays a calendar in the terminal with the current day highlighted. It can show single months, multiple months, or entire years. By default, Sunday is shown as the first day of the week. Use -m to start weeks on Monday.

参数

-3, --three
Display previous, current, and next month
-y, --year
Display calendar for the current year
-Y, --twelve
Display the next twelve months
-m, --monday
Use Monday as the first day of the week
-s, --sunday
Use Sunday as the first day of the week (default)
-j, --julian
Display Julian days (day of year)
-n _num_
Display _num_ months starting from current

FAQ

What is the cal command used for?

cal displays a calendar in the terminal with the current day highlighted. It can show single months, multiple months, or entire years. By default, Sunday is shown as the first day of the week. Use -m to start weeks on Monday.

How do I run a basic cal example?

Run `cal` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -3, --three do in cal?

Display previous, current, and next month