Ubuntu clear dns cache
In Debian/Ubuntu, that file is /var/cache/nscd/hosts for the hosts/DNS cache, so you can run strings /var/cache/nscd/hosts to see the hosts in cache. Note that this is a total hack as there is seemingly no proper way to inspect the nscd cache without decoding the binary format.