how to ping sweep with nmap code example Example: nmap ping sweep nmap -sP 172.31.1-255.1-255 # quick ping sweep (no port scanning)