Emptying the DNS cache

Source: Internet
Author: User

Yesterday wrote a Python script, the function is to crawl a page of the Google IP address and then write to the local hosts inside.

But after writing it and running it, I found it wasn't Google. So I thought about whether to clear the DNS cache. But I only know win below empty cache, in cmd inside dozen Ipconfig/flushdns on the line, Mac with two months not too familiar, on the internet to find a bit, found that the Mac different systems need different commands. This is just a note of the Lion system's subsequent commands, which were not used before.

The commands of Lion, Mountain Lion, and Mavericks are sudo killall-hup mdnsresponder

Yosemite sudo discoveryutil mdnsflushcache

I reckon it's mavericks now except Yosemite.

Emptying the DNS cache

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.