Linux: Investigate an Incident in the Logs

The app had errors overnight. Use the shell to find out how many, from which clients, and archive the evidence.

Tasks

  1. Count the ERROR lines in /var/log/webasha/app.log and save just the number to ~/error-count.txt.
  2. Save the unique client IPs (2nd column), sorted, to ~/ips.txt.
  3. Archive /var/log/webasha into ~/logs.tar.gz.