1 |
> I was wondering why Linux doesn't treat directories like files, as many |
2 |
> other unix implementations do. |
3 |
> For example, in Linux, you can't do 'cat .' while on FreeBSD you can. |
4 |
> Why? There is a practical reason? |
5 |
|
6 |
I'd say it's not a matter of how Linux treats directories |
7 |
(putting aside the problem of diverse filesystems), but how |
8 |
coreutils or "cat", to be precise, treats directories. You could just as |
9 |
well implement such a feature into 'cat' which would make it behave like |
10 |
it does on FreeBSD when called on a directory. As to why Linux's "cat" |
11 |
acts the way it does...try asking GNU guys.:) |
12 |
|
13 |
Btw, in my place: |
14 |
$ uname -a |
15 |
FreeBSD howdy123 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Wed Apr 5 |
16 |
12:22:42 CEST 2006 root@howdy123:/usr/obj/usr/src/sys/GORGO i386 |
17 |
$ cat . |
18 |
cat: .: Is a directory |
19 |
$ |
20 |
|
21 |
...which is exactly the same behavior as on my Gentoo. |
22 |
|
23 |
-rz |
24 |
-- |
25 |
gentoo-user@g.o mailing list |