Linux command cal, calendar

Linux command cal, calendar

Hello colleagues.

In today's article, we will look at such a command in Linux like cal. The cal command is designed to allow you to view the yearly calendar or even narrow it down to a monthly calendar. cal is a great tool that displays a calendar for a specific year or month depending on the passed parameters.

 

Article content:

  1. Cal syntax.
  2. Examples.

 

1. Cal syntax.

cal [-mjy] [[month] year]

  • -m - displays the current month.
  • -j - displays the number of the current day
  • -y - will display all months of the current year.

 

2. Examples.

2.1. Show the current month of the current year.

$. cal

linux_cal

 

2.2. Show all months of the current year.

$. cal -y

linux_cal

 

2.3. Show the last month of calendar in the current year.

$. cal 12 2022

linux_cal


 

Thank you all, I hope my article was of some help to you.

SIMILAR ARTICLES

mv command in linux. Moving/Renaming files.
mv command in linux. Moving/Renaming files.
TERMINAL
Read more
tail command in linux. View the last lines of a file.
tail command in linux. View the last lines of a file.
TERMINAL
Read more
Linux date command: how to set, change, format and display date
Linux date command: how to set, change, format and display date
TERMINAL
Read more