something odd with the order of files in a directory

Folkert van Heusden folkert at vanheusden.com
Fri Jan 16 12:01:19 UTC 2009


Hi,

I noticed something odd with the order of files in a directory.
When I put files in a directory in a certain order on an
ext3-filesystem, the order is not kept. On fat-filesystem it does.
E.g.:
rm -rf t ; mkdir t
touch a.a a.b a.c
mv a.b t/ ; mv a.c t/ ; mv a.a t/
ls -Ula t/

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 .

I tried adding sync between each mv but that didn't help.


Folkert van Heusden

-- 
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com




More information about the Ext3-users mailing list