line lengths in /etc/hosts

Polytropon freebsd at edvax.de
Wed Mar 27 09:06:40 UTC 2013


On Wed, 27 Mar 2013 01:57:48 -0700, Perry Hutchison wrote:
> I can easily suppress access to unwanted web sites by adding
> names to the localhost line in /etc/hosts, like this:
> 
>   127.0.0.1	localhost localhost.my.domain bad1.com bad2.com ...
> 
> My version of that line has gotten rather long :)

Without actually havint tested this, but have you considered
using the \ continuation character (linebreak escape) to avoid
the problem? Also I think there's not a generic limit to the
/etc/hosts file itself, but maybe to the input buffers of the
programs that read this file...


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list