Finding current leases in ISC DHCPD

A quick grep statement to find stanzas for leases issued the current day:

TODAY=`printf ‘%(%Y/%m/%d)T’ -1`; egrep -A9 -B1 “starts . $TODAY” /var/lib/dhcpd/dhcpd.leases;unset TODAY

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.