4 ms·
What's the concern? It's pretty easy to see all entries point to 127.0.0.1.
by stblack 14y ago
What's the concern? It's pretty easy to see all entries point to 127.0.0.1.
- ebbv 14y agoYou've just illustrated his point because not all entries do point to loopback.
- deleted 14y ago[deleted]
- to3m 14y agoif you pass it through grep, you can see that virtually every non-comment line refers to 127.0.0.1: ~/tmp% grep -v "^[[:space:]]*#" fred.txt | grep -v "^[[:space:]]*$" | grep -v 127.0.0.1 books guestbook hosts text file rss feed 0.0.0.0 0 text file old macs 0 old macs math links origami photos polls siteoftheday home Hosted by: theorem.ca how to make the internet not suck (as much) 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost Fri Feb 22 08:05:36 2013top ~/tmp% And I just realised now that the junk at the top of the output comes from me doing a Select All on the web page to highlight everything first, and it picked up the headers! Ooops. So there's in fact 3 non-comment lines that don't refer to localhost.
- WestCoastJustin 14y agoLooking at the body of the text, rather than the head/footer, and excluding comments lines, here is what I get with counts: [~]$ cat hosts_example.txt | grep -v '#' | awk '{print $1}'| sort | uniq -c 56 1 ::1 9674 127.0.0.1 1 255.255.255.255 1 fe80::1%lo0
- deleted 14y ago[deleted]