LPI
201-450 · 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.
System Maintenance
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
(48 responses)- A81% (39)
- B2% (1)
- D6% (3)
- E10% (5)
Topics
#log analysis#grep#egrep#date filtering
Community Discussion
No community discussion yet for this question.