This comes up from time to time for me. Either myself or someone else needs to see what address are either in use or not in use (at least as far as ping is concerned). So here are a few oneliners to hopefully make your day brighter.

Assuming your network is 192.168.1.0/24 (thats 192.168.1.0-255 255.255.255.0).

Use nmap to ping scan your network

nmap -v -sP 192.168.1.0/24

Use nmap and grep to scan your network and filter for hosts that are “up”

nmap -v -sP 192.168.1.0/24 | grep up

Use nmap and grep to scan your network and filter for ips that are unused or non-responsive

nmap -v -sP 192.168.1.0/24 | grep down

Many times you just want the list of addresses because you are going to do some other processing on them.

Use nmap,  and awk to get only the list of ips that are unresponsive

nmap -v -sP 192.168.1.0/24 | awk '/down/ {print $2}'

Of course you can add some file redirection here if you need to save the output.

nmap -v -sP 192.168.1.0/24 | awk '/down' {print $2}' > iplist.txt