find /var/log -name "*.log" -mtime -1
find /var/log -name "*.log" -mtime -1
find /var/log -name "*.log" -mtime -1
tail -f /var/log/nginx/access.log
tail -f /var/log/nginx/access.log
tail -f /var/log/nginx/access.log
du -sh /var/* | sort -hr | head -5
du -sh /var/* | sort -hr | head -5
du -sh /var/* | sort -hr | head -5
systemctl status nginx
systemctl status nginx
systemctl status nginx
sudo systemctl start nginx
sudo systemctl start nginx
sudo systemctl start nginx
sudo systemctl enable nginx
sudo systemctl enable nginx
sudo systemctl enable nginx
-rwxr-xr-- 1 ubuntu ubuntu 2048 May 10 10:30 deploy.sh
-rwxr-xr-- 1 ubuntu ubuntu 2048 May 10 10:30 deploy.sh
-rwxr-xr-- 1 ubuntu ubuntu 2048 May 10 10:30 deploy.sh
chmod +x deploy.sh
chmod +x deploy.sh
chmod +x deploy.sh
ping google.com
ping google.com
ping google.com
ss -tulnp | grep 80
ss -tulnp | grep 80
ss -tulnp | grep 80
curl -I http://localhost:8080
curl -I http://localhost:8080
curl -I http://localhost:8080
ping google.com > success.log 2> error.log
ping google.com > success.log 2> error.log
ping google.com > success.log 2> error.log
grep " 500 " /var/log/nginx/access.log
grep " 500 " /var/log/nginx/access.log
grep " 500 " /var/log/nginx/access.log
grep " 500 " /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -nr
grep " 500 " /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -nr
grep " 500 " /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -nr
sed -i 's/old-domain.com/new-domain.com/g' *.conf
sed -i 's/old-domain.com/new-domain.com/g' *.conf
sed -i 's/old-domain.com/new-domain.com/g' *.conf - pwd – Where the hell are you? Run it. Always. Like checking your GPS in a dark alley.
- ls – List files. But use ls -la. I missed a broken .env.production once because I didn’t see the dot-file. Cost me 40 minutes and a sprint review.
- cd – Obvious? Sure. But cd - is gold. Jumps back to last dir. Lifesaver when you’re bouncing between /var/log and /opt/app. - /var/log/syslog – Ubuntu/Debian. Everything dumps here.
- /var/log/messages – RHEL/CentOS. Same idea.
- /var/log/auth.log – Failed SSH attempts. If you’re seeing repeated IP tries from Russia — yeah, it’s a bot. Block it. - a – All processes
- u – User details
- x – Even the ones without a terminal - Read (r) – See contents
- Write (w) – Edit
- Execute (x) – Run as script - PID and process name - > – Overwrite
- >> – Append
- 2> – Errors only