MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following is true about the date command?
A
Without arguments it displays the current date only
B
Without arguments it displays both current date and time
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -date command is used to display the system date and time. date command is also used to set date and time of the system. By default the date command displays the date in the time zone on which unix/linux operating system is configured.

Detailed explanation-2: -These are the most common formatting characters for the date command: %D – Display date as mm/dd/yy. %Y – Year (e.g., 2020)

Detailed explanation-3: -To display current date and time under Linux operating system using command prompt use the date command or timedatectl command. These commands can also display the current time / date in the given FORMAT. We can set the system date and time as root user too.

Detailed explanation-4: -Cal is a terminal command used in Linux to print a calendar. Simply type cal to display the current month calendar. If no arguments are provided the cal command displays the current month calendar with the current date highlighted.

There is 1 question to complete.