1 |
Selon Hans-Werner Hilse <hilse@×××.de>: |
2 |
|
3 |
> Hi, |
4 |
> |
5 |
> On Mon, 18 Sep 2006 11:10:57 +0200 Matteo Pillon |
6 |
> <matteo.pillon@×××××.com> wrote: |
7 |
> |
8 |
> > I was wondering why Linux doesn't treat directories like files, as |
9 |
> > many other unix implementations do. |
10 |
> |
11 |
> Pragmatic answer: |
12 |
> |
13 |
> because nobody implemented it for most filesystems. Most filesystems |
14 |
> just define "generic_read_dir" as handling function for "readdir". |
15 |
> "generic_read_dir" always returns -EISDIR. |
16 |
> |
17 |
> (see /usr/src/linux/fs/libfs.c and /usr/src/linux/fs/*/dir.c) |
18 |
> |
19 |
> > For example, in Linux, you can't do 'cat .' while on FreeBSD you can. |
20 |
> > Why? There is a practical reason? |
21 |
> |
22 |
> |
23 |
Try vim . or, better view . |
24 |
|
25 |
-- |
26 |
~adj~ |
27 |
|
28 |
|
29 |
-- |
30 |
gentoo-user@g.o mailing list |