nerdexam
LPI

010-100 · Question #45

With which command can you determine the time of the last restart of a system?

The correct answer is E. last reboot. The 'last reboot' command reads the system wtmp log and displays a history of system reboots, including the most recent one.

The Power of the Command Line

Question

With which command can you determine the time of the last restart of a system?

Options

  • Acurrent reboottime
  • Bfind reboot
  • Cexpect --reboot
  • Dlast | reboot
  • Elast reboot

How the community answered

(42 responses)
  • A
    2% (1)
  • C
    10% (4)
  • D
    5% (2)
  • E
    83% (35)

Why each option

The 'last reboot' command reads the system wtmp log and displays a history of system reboots, including the most recent one.

Acurrent reboottime

'current reboottime' is not a valid Linux command and does not exist on standard systems.

Bfind reboot

'find reboot' is not a valid command syntax; 'find' is used for locating files by attributes, not querying system uptime records.

Cexpect --reboot

'expect --reboot' is not a valid usage; 'expect' is a scripting tool for automating interactive programs, not for querying reboot history.

Dlast | reboot

'last | reboot' pipes the output of 'last' into 'reboot', which would attempt to restart the system, not display reboot history.

Elast rebootCorrect

The 'last' command reads /var/log/wtmp and displays login/reboot records. When given 'reboot' as an argument, it filters output to show only reboot events, including the timestamp of each. This is the standard Linux method for determining when the system was last restarted.

Concept tested: Using 'last reboot' to view system restart history

Source: https://man7.org/linux/man-pages/man1/last.1.html

Topics

#last command#reboot history#system uptime

Community Discussion

No community discussion yet for this question.

Full 010-100 Practice