You work as the Network Administrator for Perfect solutions Inc. The company has a Linux-based
Network. You are working as a root user. You want to know what the day will be on 20 July 2010.
Which of the following commands should you use to accomplish this task?
A.
cal
B.
cal 20 July
C.
cal 7 2010
D.
date
Explanation:
The cal 7 2010 command will display the calendar of July 2010.
What is the cal command?
The cal command prints an ASCII calendar of the current month.
Syntax: cal [month] [year]
Given a month and year as arguments, cal displays the calendar for that particular month of the
given year.
When a single numeric argument (such as 2005) is given, cal will display a calendar for the given
year. Always use a fourdigit year. For example, the command cal 05 will display the calendar for
the year 05, not the year
2005.
Answer option B is incorrect. The cal 20 July command will display only the month and year, and
not the date.Answer option A is incorrect. The cal command will display the calendar of the current month.
Answer option D is incorrect. The date command will display the current date and time of the
system.