Dot files always first in directory?

Brandon S. Allbery allbery at ncoast.ORG
Mon May 15 05:47:09 AEST 1989


As quoted from <167 at dg.dg.com> by rec at dg.dg.com (Robert Cousins):
+---------------
| In article <2892 at osiris.UUCP> consult at 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 at ncoast.org
uunet!hal.cwru.edu!ncoast!allbery		    ncoast!allbery at hal.cwru.edu
      Send comp.sources.misc submissions to comp-sources-misc@<backbone>
NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser



More information about the Comp.unix.wizards mailing list