Dot files always first in directory?

Unix Consultation Mailbox consult at osiris.UUCP
Sat May 6 01:00:18 AEST 1989


In article <2778 at buengc.BU.EDU> bph at buengc.bu.edu (Blair P. Houghton) writes:
>In article <3540 at udccvax1.acs.udel.EDU> conan at vax1.acs.udel.EDU (Robert B Carroll) writes:
>>NO, its not save to assume that.
>>try "touch #abcd" then 'list' the directory.
>
>To beat this horse quite dead, any leading character that would sort before
>the period will place the filename before the . and .. in a directory
>listing.

That ain't no horse, it's a red herring.

The order of files in a "directory listing" (using ls, which by default
sorts everything by ASCII collating sequence before writing it to stdout)
has nothing to do with the real order of the files in the directory.  You
can only force that order by writing the directory yourself, which is
something permitted only to root and not recommended anyway.


phil



More information about the Comp.unix.wizards mailing list