Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!hal!ncoast!allbery From: allbery@ncoast.ORG (Brandon S. Allbery) Newsgroups: comp.unix.wizards Subject: Re: Dot files always first in directory? Message-ID: <13642@ncoast.ORG> Date: 14 May 89 19:47:09 GMT References: <11108@bloom-beacon.MIT.EDU> <3540@udccvax1.acs.udel.EDU> <2778@buengc.BU.EDU> <2892@osiris.UUCP> <167@dg.dg.com> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.unix.wizards Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 31 As quoted from <167@dg.dg.com> by rec@dg.dg.com (Robert Cousins): +--------------- | In article <2892@osiris.UUCP> consult@osiris.UUCP (Unix Consultation Mailbox (Phil)) writes: | >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 +--------------- But "ls" ALSO does so. Try "ls .". +--------------- | >You | >can only force that order by writing the directory yourself, which is | >something permitted only to root and not recommended anyway. | | On some versions of Unix, even this is not allowed. Any highly secure +--------------- On MOST versions of Unix, it's not allowed. Unless, of course, you mean by using adb on the device and mangling the directory blocks yourself.... ++Brandon -- Brandon S. Allbery, moderator of comp.sources.misc allbery@ncoast.org uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu Send comp.sources.misc submissions to comp-sources-misc@ NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser