Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2001 09:37:19 -0700
From:      Matthew Hunt <mph@astro.caltech.edu>
To:        "Steve O'Hara-Smith" <steveo@eircom.net>
Cc:        Juha Saarinen <juha@saarinen.org>, dmmiller@cvzoom.net, stable@FreeBSD.ORG
Subject:   Re: tail
Message-ID:  <20010501093719.A52533@wopr.caltech.edu>
In-Reply-To: <20010501073018.748a7f1d.steveo@eircom.net>; from steveo@eircom.net on Tue, May 01, 2001 at 07:30:18AM %2B0200
References:  <3AED6781.8746018D@cvzoom.net> <KPECIILENDDLPCNIMLOFEEPDCCAA.juha@saarinen.org> <20010501073018.748a7f1d.steveo@eircom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 01, 2001 at 07:30:18AM +0200, Steve O'Hara-Smith wrote:

> JS> Not sure about this; if you e.g. vi a directory, it will warn you that it
> 
> 	It is dangerous to vi a directory, but it is not dangerous to tail
> one.

More to the point, opening a directory for writing is an error.  Since
you normally use an editor to modify files, instead of just viewing them,
it makes sense that vi warns you that you won't be able to write back your
changes.  It would not make sense for tail to warn you, because it only
reads files.

wopr:~$ perl -e 'open SPORK, ">tmp/" or die "$!"'
Is a directory at -e line 1.
wopr:~$ perl -e 'open SPORK, "tmp/" or die "$!"'
wopr:~$ 

(See also "man 2 open".)

-- 
Matthew Hunt <mph@astro.caltech.edu> * Clearly there are more things in the
http://www.pobox.com/~mph/           * heavens than anyone anticipated. -enp

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010501093719.A52533>