Use of the Linux cal command
1. Brief introduction to Command
The cal (calendar) command is used to display the Gregorian calendar for the current or specified date.
two。 Command format
Cal [OPTIONS] [DAY] MONTH] YEAR]
You can specify YEAR (1-9999), MONTH (1-12), and DAY (1-31). Cal is not performed separately with any options and parameters, and the current month calendar is displayed.
3. Option description
-1,-- one displays only the current month (default)-3,-- three displays the calendar of the previous month, current month, and next month-h,-- help displays help and exits-j,-- julian shows the day of the year-m,-- monday shows Monday as the first day of the week-s. -- sunday shows Sunday as the first day of the week (default)-- V,-- version displays version information and exits-y,-- year displays the calendar of the year.
4. Common examples
(1) displays the current month.
Cal
(2) displays the current month, and Monday is the first day of the week.
Cal-m
(3) display the current month and the day of the year in which the date is.
Cal-j
(4) display the calendar of the previous month, the current month, and the next month.
Cal-3
(5) display the specified date.
Cal 24 6 2015
reference
[1] cal (1) manual
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.