Ile połączeń jest na porcie X? jednolinijkowiec

Posted on Wed 20 October 2021 in Administracja • 1 min read

netstat -tn 2>/dev/null | grep :443 | awk '{print }' | cut -d: -f1 | sort | uniq -c | sort -nr | sed -e 's/ */ /' | cut -d" "  -f2 | paste -sd+ | bc

W powyższym przypadku na porcie HTTPS ale można zrobić z tego skrypt przyjmujący jako argument numer portu.

W Debianie i Ubuntu wymagane jest doinstalowanie …


Continue reading

Blokowanie zapisu plików ._ dla dysków sieciowych (na stałe)

Posted on Wed 08 July 2009 in Macbook • 1 min read

W terminalu:
defaults write com.apple.desktopservices \ DSDontWriteNetworkStores true
A potem restart.