Selon Hans-Werner Hilse <[EMAIL PROTECTED]>:

> Hi,
>
> On Mon, 18 Sep 2006 11:10:57 +0200 Matteo Pillon
> <[EMAIL PROTECTED]> wrote:
>
> > I was wondering why Linux doesn't treat directories like files, as
> > many other unix implementations do.
>
> Pragmatic answer:
>
> because nobody implemented it for most filesystems. Most filesystems
> just define "generic_read_dir" as handling function for "readdir".
> "generic_read_dir" always returns -EISDIR.
>
> (see /usr/src/linux/fs/libfs.c and /usr/src/linux/fs/*/dir.c)
>
> > For example, in Linux, you can't do 'cat .' while on FreeBSD you can.
> > Why? There is a practical reason?
>
>
Try vim . or, better view .

--
~adj~


-- 
[email protected] mailing list

Reply via email to