Linux command
gcal 命令
趣味
复制后可按需替换文件名、目录或参数。
常用示例
Show current month
gcal
Show specific month
gcal [3] [2024]
Show entire year
gcal [2024]
Show with week numbers
gcal -K
Show holidays
gcal -q [US]
Show 3 months centered on current
gcal .
说明
gcal is a feature-rich calendar program that goes far beyond simple date display. Unlike the standard cal utility, gcal supports extensive customization including week numbering, configurable week start days, and multi-month displays. One of gcal's most powerful features is its holiday calculation capability, which can display holidays for various countries and religious traditions. The program also supports astronomical data, eternal holiday lists, and various international calendar systems. gcal is highly scriptable and can be used for complex date calculations, making it valuable for both interactive use and automation tasks that require sophisticated calendar operations.
参数
- -K
- Show week numbers.
- -q _country_
- Show country holidays.
- -b _number_
- Months before current.
- -a _number_
- Months after current.
- -s _day_
- Start of week (0=Sunday).
- --today
- Highlight today.
FAQ
What is the gcal command used for?
gcal is a feature-rich calendar program that goes far beyond simple date display. Unlike the standard cal utility, gcal supports extensive customization including week numbering, configurable week start days, and multi-month displays. One of gcal's most powerful features is its holiday calculation capability, which can display holidays for various countries and religious traditions. The program also supports astronomical data, eternal holiday lists, and various international calendar systems. gcal is highly scriptable and can be used for complex date calculations, making it valuable for both interactive use and automation tasks that require sophisticated calendar operations.
How do I run a basic gcal example?
Run `gcal` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -K do in gcal?
Show week numbers.