> I was wondering why Linux doesn't treat directories like files, as many > other unix implementations do. > For example, in Linux, you can't do 'cat .' while on FreeBSD you can. > Why? There is a practical reason?
I'd say it's not a matter of how Linux treats directories (putting aside the problem of diverse filesystems), but how coreutils or "cat", to be precise, treats directories. You could just as well implement such a feature into 'cat' which would make it behave like it does on FreeBSD when called on a directory. As to why Linux's "cat" acts the way it does...try asking GNU guys.:) Btw, in my place: $ uname -a FreeBSD howdy123 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Wed Apr 5 12:22:42 CEST 2006 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GORGO i386 $ cat . cat: .: Is a directory $ ...which is exactly the same behavior as on my Gentoo. -rz -- gentoo-user@gentoo.org mailing list