* directory order of files
@ 2001-06-29 9:18 Edmund GRIMLEY EVANS
2001-06-29 9:25 ` Hans Reiser
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Edmund GRIMLEY EVANS @ 2001-06-29 9:18 UTC (permalink / raw)
To: linux-kernel
With Linux ext2, and some other systems, when you create files in a
new directory, the file system remembers their order:
$ mkdir new
$ cd new
$ touch one two three four
$ ls -U
one two three four
(1) Is there any standard that says a system should behave this way?
Is there any software that depends on this behaviour?
(2) Are there Linux file systems that don't work this way? Maybe
someone with a mounted writable reiserfs could do a quick check.
Please copy replies to me as I am not subscribed. Thanks.
Edmund
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: directory order of files
2001-06-29 9:18 directory order of files Edmund GRIMLEY EVANS
@ 2001-06-29 9:25 ` Hans Reiser
2001-06-29 9:36 ` Alan Cox
2001-06-29 11:34 ` lk
2 siblings, 0 replies; 5+ messages in thread
From: Hans Reiser @ 2001-06-29 9:25 UTC (permalink / raw)
To: Edmund GRIMLEY EVANS; +Cc: linux-kernel
Edmund GRIMLEY EVANS wrote:
>
> With Linux ext2, and some other systems, when you create files in a
> new directory, the file system remembers their order:
>
> $ mkdir new
> $ cd new
> $ touch one two three four
> $ ls -U
> one two three four
>
> (1) Is there any standard that says a system should behave this way?
> Is there any software that depends on this behaviour?
Unix filesystem hierarchies are defined to be a partial ordering, not a full ordering.
>
> (2) Are there Linux file systems that don't work this way? Maybe
> someone with a mounted writable reiserfs could do a quick check.
>
> Please copy replies to me as I am not subscribed. Thanks.
bash-2.05# mkdir fu
bash-2.05# cd fu
bash-2.05# touch one two three four
bash-2.05# ls -U
one two four three
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: directory order of files
2001-06-29 9:18 directory order of files Edmund GRIMLEY EVANS
2001-06-29 9:25 ` Hans Reiser
@ 2001-06-29 9:36 ` Alan Cox
2001-06-29 10:09 ` Alexander Viro
2001-06-29 11:34 ` lk
2 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2001-06-29 9:36 UTC (permalink / raw)
To: Edmund GRIMLEY EVANS; +Cc: linux-kernel
> With Linux ext2, and some other systems, when you create files in a
> new directory, the file system remembers their order:
No - it merely seems too.
> $ touch one two three four
> $ ls -U
> one two three four
Then try 'rm three; touch five'
>
> (1) Is there any standard that says a system should behave this way?
> Is there any software that depends on this behaviour?
The order is arbitary.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: directory order of files
2001-06-29 9:36 ` Alan Cox
@ 2001-06-29 10:09 ` Alexander Viro
0 siblings, 0 replies; 5+ messages in thread
From: Alexander Viro @ 2001-06-29 10:09 UTC (permalink / raw)
To: Alan Cox; +Cc: Edmund GRIMLEY EVANS, linux-kernel
On Fri, 29 Jun 2001, Alan Cox wrote:
> > With Linux ext2, and some other systems, when you create files in a
> > new directory, the file system remembers their order:
>
> No - it merely seems too.
>
> > $ touch one two three four
> > $ ls -U
> > one two three four
>
> Then try 'rm three; touch five'
Moreover, it isn't true even for the case when we create a list of files
in empty directory. Example: assuming that /tmp has 1Kb blocks,
mkdir /tmp/A
cd A
touch `perl -e 'print "a"x255'`
touch `perl -e 'print "b"x255'`
touch `perl -e 'print "c"x255'`
touch `perl -e 'print "d"x255'`
touch A
ls -U
will give you (lots of a) (lots of b) (lots of c) A (lots of d).
With 4Kb blocks you'll need 16 long names instead of 4 - the effect
will be the same.
The reason is quite simple - at some point you get no space for long
name and it goes into the next directory block, but there's still enough
for a short name, so it gets created in the first block.
IOW, there's no warranties at all.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: directory order of files
2001-06-29 9:18 directory order of files Edmund GRIMLEY EVANS
2001-06-29 9:25 ` Hans Reiser
2001-06-29 9:36 ` Alan Cox
@ 2001-06-29 11:34 ` lk
2 siblings, 0 replies; 5+ messages in thread
From: lk @ 2001-06-29 11:34 UTC (permalink / raw)
To: Edmund GRIMLEY EVANS; +Cc: linux-kernel
on reiserfs ls -U show soething like:
one two four three
On Fri, 29 Jun 2001, Edmund GRIMLEY EVANS wrote:
> With Linux ext2, and some other systems, when you create files in a
> new directory, the file system remembers their order:
>
> $ mkdir new
> $ cd new
> $ touch one two three four
> $ ls -U
> one two three four
>
> (1) Is there any standard that says a system should behave this way?
> Is there any software that depends on this behaviour?
>
> (2) Are there Linux file systems that don't work this way? Maybe
> someone with a mounted writable reiserfs could do a quick check.
>
> Please copy replies to me as I am not subscribed. Thanks.
>
> Edmund
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-06-29 11:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-29 9:18 directory order of files Edmund GRIMLEY EVANS
2001-06-29 9:25 ` Hans Reiser
2001-06-29 9:36 ` Alan Cox
2001-06-29 10:09 ` Alexander Viro
2001-06-29 11:34 ` lk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®