nerdexam
LPI

201-400 · Question #43

Hundreds of people log in to a server from remote locations per day. Which of the following commands show remote SSH, FTP & telnet sessions for a particular day?

The correct answer is A. cat /var/log/messages | grep "'date "+%b %e"'" | egrep '(telnet|ssh|ftp)' C. cat /var/log/messages | grep "`date "+%b %e"`" | grep -E '(telnet|ssh|ftp)'. See the full explanation below for the reasoning.

Question

Hundreds of people log in to a server from remote locations per day. Which of the following commands show remote SSH, FTP & telnet sessions for a particular day?

Options

  • Acat /var/log/messages | grep "'date "+%b %e"'" | egrep '(telnet|ssh|ftp)'
  • Bcat /var/log/messages | egrep '(telnet|ssh|ftp)'
  • Ccat /var/log/messages | grep "date "+%b %e"" | grep -E '(telnet|ssh|ftp)'
  • Dcat /var/log/messages | date | egrep '(telnet|ssh|ftp)'
  • Ecat /var/log/messages > grep "'date "+%b %e"'" > egrep '(telnet\ssh\ftp)'

How the community answered

(32 responses)
  • A
    75% (24)
  • B
    3% (1)
  • D
    16% (5)
  • E
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 201-400 Practice