DEV // SURVIVAL // KIT · VIBE // CODER // SURVIVAL The Linux Commands That Save You From Claude Server full? Port in use? “It stopped working” on the server? — Every dev needs to know these. Slide 1 — Claude Writes a Lot Docker images, log files, node_modules copies, temporary build artifacts. Claude generates code — but cleaning up is on you. These commands show you immediately what is eating your server: # How full is the disk? df -h # Which directory is consuming the most? du -sh /* 2>/dev/null | sort -rh | head -10 # Kill Docker leftovers (images, containers, volumes, cache) docker system prune -af --volumes # How large is a single directory? du -sh /opt/techlogia/ Rule of thumb: When df -h shows over 80%, things will break soon. Slide 2 — Server Full The most common reason deploys silently die: no disk space left. Logs grow to gigabyte size without anyone noticing. # Find largest files on the system find / -type f -size +100M -printf '%s\t%p\n' 2>/dev/null | sort -rn | head -10 # Empty a log file without deleting it truncate -s 0 /var/log/nginx/access.log # Limit systemd logs journalctl --vacuum-size=200M Slide 3 — Port Already in Use Claude starts the dev server — but port 3000 is still running from last time. Instead of guessing: # Who is listening on port 3000? lsof -i :3000 # Show all occupied ports ss -tlnp # Kill the process on port 3000 kill -9 $(lsof -t -i :3000) # Or more directly: fuser -k 3000/tcp Slide 4 — Keep Processes Under Control After 10 Claude sessions, sometimes 5 instances of the same service are running. Here is how to keep track: # All running processes sorted by memory usage ps aux --sort=-%mem | head -15 # Interactive process monitor htop # Kill process by name pkill -f "node server.js" # Kill all processes of a user pkill -u www-data Slide 5 — Read Logs Without Drowning Claude outputs an error — but which log file? And what happened just before? # Last 50 lines of a log tail -n 50 /var/log/nginx/error.log # Watch live tail -f /var/log/syslog # Search for errors in Docker container logs docker logs techlogia-backend --tail 100 | grep -i error # Logs since a specific time journalctl --since "2026-04-23 10:00" --until "2026-04-23 11:00" Slide 6 — Find the Mess: Claude Created 47 Files Not sure what Claude created anymore? These commands show you: # Files sorted by modification date (newest first) ls -lt /opt/myproject/ | head -20 # All files newer than 1 hour find . -newer /tmp/timestamp -type f 2>/dev/null # Set a timestamp (then see all files created after it) touch /tmp/timestamp # How many files are in a directory? find . -type f | wc -l # Find duplicate files # apt install fdupes (if not yet installed) fdupes -r . 2>/dev/null | head -20 # Alternative without installation: find . -type f -exec md5sum {} + 2>/dev/null | sort | awk 'NR>1 && prev==$1 {print p; print $2} {prev=$1; p=$2}' | head -20 Slide 7 — Replace Deploys: No Docker, No CI/CD, No Stress Sometimes you just want to push a file to the server fast. No pipeline, no workflow: # Copy a single file to server scp -i ~/.ssh/mykey file.py root@server:/opt/app/ # Sync a whole directory (changes only) rsync -avz --delete ./dist/ root@server:/opt/app/dist/ # Run command on server without logging in ssh root@server "cd /opt/app && git pull && docker compose restart backend" # Emergency rollback ssh root@server "cd /opt/app && git revert HEAD --no-edit && docker compose up -d" LINUX COMMANDS FOR VIBE CODERS The Cheatsheet Problem Command Disk full df -h && docker system prune -af Port in use lsof -i :PORT Process hung pkill -f "processname" Log exploded truncate -s 0 logfile.log What did Claude create? find . -newer /tmp/ts -type f Quick deploy rsync -avz ./dist/ root@server:/opt/ No stack, no framework — just open a terminal and get it done.