nerdexam
CompTIA

LX0-101 · Question #353

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 D. cat/var/log/messages | grep '"date "+%b%e'"" | egrep'(telnet |ssh| ftp)' E. 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 | egrep'(telnet|ssh|ftp)'
  • Bcat/var/log/messages > grep '"date "+%b %e1"" > egrep '(telnet |ssh |ftp)'
  • Ccat /var/log/messages | date | egrep'(telnet |ssh| ftp)1
  • Dcat/var/log/messages | grep '"date "+%b%e'"" | egrep'(telnet |ssh| ftp)'
  • Ecat/var/log/messages | grep'"date "+%b%e.....| grep-E'(telnet|ssh| ftp)'

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    7% (2)
  • C
    13% (4)
  • D
    77% (23)

Community Discussion

No community discussion yet for this question.

Full LX0-101 Practice