0% found this document useful (0 votes)
15 views

Ques: 1 Write The Linux Command To Display Calendar With Various Options

The document provides information about the cal and date commands in Linux. It lists options for displaying calendars and dates in different formats with cal such as specifying a month or year. It also lists formatting options for displaying the date such as %d for the day, %m for the month, and %y for the last two digits of the year.

Uploaded by

Ishan Dang
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Ques: 1 Write The Linux Command To Display Calendar With Various Options

The document provides information about the cal and date commands in Linux. It lists options for displaying calendars and dates in different formats with cal such as specifying a month or year. It also lists formatting options for displaying the date such as %d for the day, %m for the month, and %y for the last two digits of the year.

Uploaded by

Ishan Dang
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Linux Lab

Ques: 1 Write the linux command to display calendar with various options.
Command :- calender
Syntax :- cal
Description :- This Command use to display the calendar for current month. There are various
options to display calendar for specific month with specific formats. Few formats are as follows:
 Cal [month]: displays the current month calendar.
 Cal [year]: displays the calendar of the full year of given value.
 Cal -3: display calendar for 3 months [previous, current, next month].
 Cal –j: displays the calendar in Julian format.
 Cal –m: display the calendar of previous month

1
Name –
Class – BCA (M)
Roll No-
Linux Lab

Ques: 2 Write a linux command to display date with various options.


Command :- date
Syntax :- date
Description :-It used to view the server date. Date can be viewed in various formats.

 Date %d: displays the day of the month.


 Date %m: displays the month[1…..12]
 Date %y: displays the last two digits of the year [16, 17….].
 Date %d/%m/%y: display the date, month, year separated by the slash.

2
Name –
Class – BCA (M)
Roll No-

You might also like