On the same topic, $ man 5 hosts BUGS: Lines in /etc/hosts are limited to BUFSIZ characters (currently 1024). Longer lines will be ignored.
I've made a couple of test: 1. If the line has the following pattern: 10.0.1.1 aaaaaaaaaaaaaaaaaa bbbb....b cccc....c zzzz....z $ getent hosts 10.0.1.1 10.0.1.1 aaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbb ..... iiiiiiiiiiiiiiii So it trims the line and we are on the SANE size (less than 1024) 2. By LINE its meant to be LINE WITHOUT IP. One can test this by: 10.0.1.1 aaa...a Where there are 1023 letter a. If IP is taken into account, the line has more than 1024 characteres.