Hi all,
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?
Forgive me this OT, I wasn't able to find a suitable list.
Thanks for replies.
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
IMHO would be to show a corresponding error message.
Best Regards
Sebastian Noack
-Ursprüngliche Nachricht-
Von: Matteo Pillon [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 18. September 2006 11:11
An: gentoo-user@lists.gentoo.org
Betreff: [gentoo-user] [OT] Why directories aren't
Am Montag, 18. September 2006 11:10 schrieb ext Matteo Pillon:
I was wondering why Linux doesn't treat directories like files, as many
other unix implementations do.
It's not Linux, but the applications.
For example, in Linux, you can't do 'cat .' while on FreeBSD you can.
Why? There is a
On Mon, Sep 18, 2006 at 11:42:29AM +0200, Roman Zilka wrote:
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
Hi,
On Mon, Sep 18, 2006 at 11:49:38AM +0200, Noack, Sebastian wrote:
But independent from this aspect, a file refers in its inode to a
chunk of storage on the hard disk (or other storage medias), which
contains its data. But some files like directories don't contain data.
A directory IS like
. September 2006 13:50
An: gentoo-user@lists.gentoo.org
Betreff: Re: AW: [gentoo-user] [OT] Why directories aren't files?
Hi,
On Mon, Sep 18, 2006 at 11:49:38AM +0200, Noack, Sebastian wrote:
But independent from this aspect, a file refers in its inode to a
chunk of storage on the hard disk
Hm, this is all pretty weird. I cut'n'pasted and compiled your piece
of code and again got the same results under Linux and FreeBSD: no
output at all. I don't know if some local FreeBSD admin hacked/patched
the kernel source to make its syscalls behave Linux-alike, but it's very
unlikely.
Am Montag, 18. September 2006 15:04 schrieb ext Roman Zilka:
Hm, this is all pretty weird. I cut'n'pasted and compiled your piece
of code and again got the same results under Linux and FreeBSD: no
output at all. I don't know if some local FreeBSD admin hacked/patched
the kernel source to make
Hm, this is all pretty weird. I cut'n'pasted and compiled your piece
of code and again got the same results under Linux and FreeBSD: no
output at all. I don't know if some local FreeBSD admin hacked/patched
the kernel source to make its syscalls behave Linux-alike, but it's very
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
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
On Mon, Sep 18, 2006 at 04:30:52PM +0200, Hans-Werner Hilse wrote:
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
Hi,
On Mon, 18 Sep 2006 17:13:11 +0200
[EMAIL PROTECTED] wrote:
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 .
It was mentioned before that applications have support for reading
directories. But
Hi,
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.
sorry short correction, should read:
... as handling function for read.
readdir of course should be implemented for
Matteo Pillon wrote:
For example, in Linux, you can't do 'cat .' while on FreeBSD you can.
Why? There is a practical reason?
I don't know why, but I do know that you can do 'less .'.
--
gentoo-user@gentoo.org mailing list
Am Montag, 18. September 2006 16:51 schrieb ext Roman Zilka:
Hm, this is all pretty weird. I cut'n'pasted and compiled your piece
of code and again got the same results under Linux and FreeBSD: no
output at all. I don't know if some local FreeBSD admin
hacked/patched the kernel source
17 matches
Mail list logo