Forum Discussion
Dark_Knight666
Bronze III
2 months agoWeb Log Analysis: Ep.5 – Searching Web Server Logs using Linux CLI
Hello, I was wondering if I could please get me help in the right direction. So I'm on Q3 for this lab and a little confused as to how to combine my commands in order to answer the question? So ...
- 2 months ago
Well, the idea of the lab seems to be: Use "cut" to extract the IP address from the logs, and then count the unique values.
Another tool that you'll love or hate is awk. One of the most basic commands isawk '{print $1}'Complete example:
echo "a b c" | awk '{print $2}' bIt is much more versatile than cut, but not needed for this lab. Yet, I used it.
netcat
Silver III
2 months agoWell, the idea of the lab seems to be: Use "cut" to extract the IP address from the logs, and then count the unique values.
Another tool that you'll love or hate is awk. One of the most basic commands is
awk '{print $1}' Complete example:
echo "a b c" | awk '{print $2}'
bIt is much more versatile than cut, but not needed for this lab. Yet, I used it.