I tried...
sudo sort -u /etc/hosts > /etc/hosts.tmp
and received a permission denied error. So, I then ran:
sudo sort -u /etc/hosts
and it appeared to scan my file, although nothing appears to have been removed.
I ran:
sort -k 1,1 -u /etc/hosts
which appeared to scan my file, however very few entries were removed.
I think the problem is that because I appended additional hosts files I found on-line to my file, there are so many duplicate entries and formatting differences that the commands were unable to correctly edit and sort my file. I don't know how accurate this information is as I've been using Linux for only one year so I'm not that experienced with it yet.
Quote:
Why do you have such a large HOSTS file?
|
I want to block as many advertisements, web bugs, data brokers, and other malicious Internet entities as possible, even though they may or may not affect Linux. Simply put, I'm paranoid.
Sometimes I think it would be easier for me just to disconnect my PC from the Internet. I spend more time trying to harden my PC against intruders and other Internet nasties than I do using it for "normal use".