Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!lll-winken!uunet!dg!rec From: rec@dg.dg.com (Robert Cousins) Newsgroups: comp.unix.wizards Subject: Re: Dot files always first in directory? Message-ID: <167@dg.dg.com> Date: 8 May 89 14:47:53 GMT References: <11108@bloom-beacon.MIT.EDU> <3540@udccvax1.acs.udel.EDU> <2778@buengc.BU.EDU> <2892@osiris.UUCP> Reply-To: rec@dg.UUCP (Robert Cousins) Organization: Data General, Westboro, MA. Lines: 31 In article <2892@osiris.UUCP> consult@osiris.UUCP (Unix Consultation Mailbox (Phil)) writes: > >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. Actually, when one types in "ls *", the shell places all of the filenames which match the "*" on the command line as a replacement. It is the SHELL which sorts them in alphabetical order. For example, if one types "echo *", the names of all files are listed in alphabetical order. Note that the shell does not automatically insert filenames which begin with "." by convention. It sees them, but doesn't use them unless specifically instructed to do so. >You >can only force that order by writing the directory yourself, which is >something permitted only to root and not recommended anyway. > > >phil On some versions of Unix, even this is not allowed. Any highly secure unix I've ever heard of will not allow directory modification to take place on a mounted file system. Robert Cousins Speaking for myself alone.