Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Mar 2013 10:06:39 +0100
From:      Polytropon <freebsd@edvax.de>
To:        perryh@pluto.rain.com (Perry Hutchison)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: line lengths in /etc/hosts
Message-ID:  <20130327100639.bcdaf9cc.freebsd@edvax.de>
In-Reply-To: <5152b48c.U+MyuQ85COeWB4wW%perryh@pluto.rain.com>
References:  <5152b48c.U+MyuQ85COeWB4wW%perryh@pluto.rain.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20130327100639.bcdaf9cc.freebsd>