LPI
201-400 · Question #43
201-400 Question #43: Real Exam Question with Answer & Explanation
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)'
Community Discussion
No community discussion yet for this question.