Forrest logo
back to the cal tool


cal: Display a calendar for a specific month (1-12 or name).
$ cal -m ${month}
try on your machine

The command cal -m ${month} is used to display a calendar for a specific month.

Here's how it works:

  1. The cal command is a built-in command in most Unix-like operating systems that displays a calendar for the current month by default. By passing the -m option, we specify to display a calendar for a specific month.

  2. ${month} is a variable placeholder that is expected to be replaced with the desired month. The actual value of the month should be provided when running the command. For example, if we want to display the calendar for March, we would replace ${month} with 03 or 3.

  3. When the command is executed with a valid month value, it will generate a textual representation of the calendar for that specific month, showing the dates, days of the week, and any events or holidays associated with those days.

Note: It's worth mentioning that the behavior and options of the cal command may differ slightly between different operating systems.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the cal tool