Sometimes you want to know if you have manually configured DNS servers, or only DHCP assigned ones. This statement shows that for my Wi-Fi network-service:
networksetup -getdnsservers Wi-Fi
Because of the multi-client setup, you need to run this for all network-services configured on your OS X installation. You can get the list like this:
networksetup -listallnetworkservices
I’ve not yet found a way to list only active services, as the networksetup documentation indicates the -listnetworkserviceorder option will mark inactive ones with (*), but it reality does so only for disabled ones. So this does not work:
networksetup -listnetworkserviceorder
I might one day dig into combining the output of ifconfig with networksetup to figure out a shell based solution to this question.
Woof is a small simple stupid webserver that can easily be invoked on a single file. Your partner can access the file with tools he trusts (e.g. wget). No need to enter passwords on keyboards where you don’t know about keyboard sniffers, no need to start a huge lot of infrastructure, just do a
$ woof filenameand
tell the recipient the URL woof spits out. When he got that file, woof will quit and everything is done.And when someone wants to send you a file, woof has a switch to offer itself, so he can get woof and offer a file to you. …
Woof needs Python on a unix’ish operating system. Some people have used it successfully on Windows within the cygwin environment.
Via the answer below I created the renew alias. I already had the first two aliases.
alias route-and-ipaddresses="netstat -nr | grep 'Internet\|Gateway\|default' && echo && ifconfig | grep '\: flags\|inet\|inet6' && echo more detailed info through ifconfig and netstat -nr"
alias whatismyip="curl http://whatismyip.akamai.com && echo"
alias renew_dhcp="sudo ipconfig set en0 DHCP && echo waiting 10 seconds for DHCP lease to be obtained && sleep 10 && route-and-ipaddresses && whatismyip"
After that, it obtains the name servers for that TLD, and queries the glue records there, both using dig.
Here is a little shell script which implements Alnitak’sanswer:
#!/bin/sh
S=${IFS}
IFS=.
for P in $1; do
TLD=${P}
done
IFS=${S}
echo "TLD: ${TLD}"
DNSLIST=$(dig +short ${TLD}. NS)
for DNS in ${DNSLIST}; do
echo "Checking ${DNS}"
dig +norec +nocomments +noquestion +nostats +nocmd @${DNS} $1 NS
done
This split helps the Homebrew maintainers in various ways but for users the main advantages should be increasing stability over time and a quicker development process.
The migration will be handled for you automatically when you `brew update`. If you have any migration issues please create an issue at https://github.com/Homebrew/brew/issues/new
Since G+ is very bad at searching, I created this summary of the tools; read the full G+ post (Google Translate is quite OK), including comments on why.
Edit: 20160402 – I’m posting regular updates based on the comments for that G+ post. I’ve changed or added German iTunes store links to US-English ones.
In homage to its history, Apple has hung a pirate flag at its Infinite Loop Headquarters (images via @twfarley and @mjisrawi). On April 1st, 40 years ago, Apple was founded…