FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > EXT3 Users

 
 
LinkBack Thread Tools
 
Old 01-23-2009, 08:19 AM
Christian Kujau
 
Default something odd with the order of files in a directory (fwd)

On Fri, 16 Jan 2009, Folkert van Heusden wrote:

I then would expect:
a.b
a.c
a.a

but instead I get
drwxr-xr-x 3 root root 4096 2009-01-16 12:59 ..
-rw-r--r-- 1 root root 0 2009-01-16 12:59 a.c
-rw-r--r-- 1 root root 0 2009-01-16 12:59 a.b
-rw-r--r-- 1 root root 0 2009-01-16 12:59 a.a
drwxr-xr-x 2 root root 4096 2009-01-16 12:59 .


Hm, is this reproducible? Which kernel, mount-options, arch?
Here on 2.6.24/amd64 the "directory order" (GNU/ls -U resp. BSD/ls -f)
seems to work as expected:

$ touch 1 2 3
$ mv 2 t/ ; mv 3 t/; mv 1 t/
$ ls -Ugo --time-style=full-iso t/
-rw-r----- 1 0 2009-01-22 15:50:01.414115303 +0100 2
-rw-r----- 1 0 2009-01-22 15:50:01.414115303 +0100 3
-rw-r----- 1 0 2009-01-22 15:50:01.414115303 +0100 1

Christian.
--
BOFH excuse #175:

OS swapped to disk

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
 
Old 01-23-2009, 09:03 PM
Andreas Dilger
 
Default something odd with the order of files in a directory (fwd)

On Jan 23, 2009 10:19 +0100, Christian Kujau wrote:
> On Fri, 16 Jan 2009, Folkert van Heusden wrote:
>> I then would expect:
>> a.b
>> a.c
>> a.a
>>
>> but instead I get
>> drwxr-xr-x 3 root root 4096 2009-01-16 12:59 ..
>> -rw-r--r-- 1 root root 0 2009-01-16 12:59 a.c
>> -rw-r--r-- 1 root root 0 2009-01-16 12:59 a.b
>> -rw-r--r-- 1 root root 0 2009-01-16 12:59 a.a
>> drwxr-xr-x 2 root root 4096 2009-01-16 12:59 .
>
> Hm, is this reproducible? Which kernel, mount-options, arch?
> Here on 2.6.24/amd64 the "directory order" (GNU/ls -U resp. BSD/ls -f)
> seems to work as expected:

There is no such thing as "directory order" in Unix. It can change at
any time, with the caveat that a single process doing a single readdir()
will get each entry existing at the start and end of readdir exactly once.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
 

Thread Tools




All times are GMT. The time now is 05:09 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org