Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions kill-ports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Script para matar procesos en puertos de desarrollo
PORTS=(3001 3002 3003 3004 3005)

echo "🔍 Buscando procesos en puertos de desarrollo..."

for PORT in "${PORTS[@]}"; do
PID=$(netstat -ano | grep ":$PORT " | grep LISTENING | awk '{print $5}' | head -1)
if [ ! -z "$PID" ]; then
echo "🔥 Terminando proceso PID $PID en puerto $PORT"
taskkill.exe //PID $PID //F 2>/dev/null
else
echo "✅ Puerto $PORT ya está libre"
fi
done

echo "🎉 Limpieza completada!"
echo "Puertos disponibles:"
netstat -ano | grep -E ":(3001|3002|3003|3004|3005)" | grep LISTENING || echo "Todos los puertos están libres ✅"
Loading
Loading