# Code examples from: Linux Command Line for Windows Users: 20 Commands to Survive a Server
# https://www.atulvij.com/linux-commands-for-windows-users
# Review and adapt before running; examples use sample values.

# ---- Example 1 (bash) ----
grep "ERROR" app.log | cut -d' ' -f1 | sort | uniq -c | sort -rn | head

# ---- Example 2 (bash) ----
whoami                 # which user am I?
hostname               # which machine is this?
df -h                  # is the disk nearly full?
free -m                # how much memory is used?
uptime                 # how long running, and load average
ls -lh /var/log        # where the logs live
sudo tail -n 50 /var/log/nginx/error.log   # the last 50 web-server errors

