Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lll-winken!uunet!mcvax!ukc!etive!hwcs!zen!frank From: frank@zen.co.uk (Frank Wales) Newsgroups: comp.unix.wizards Subject: Re: Dot files always first in directory? Message-ID: <1581@zen.co.uk> Date: 11 May 89 08:33:18 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: frank@zen.co.uk (Frank Wales) Organization: Zengrange Limited, Leeds, England Lines: 21 In article <167@dg.dg.com> rec@dg.UUCP (Robert Cousins) writes: >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. That's a herring of another colour. Try: ls `ls|sort -r` How the shell expands metacharacters is irrelevant to what ls does with its arg list once it gets it, options excepted. -- Frank Wales, Systems Manager, [frank@zen.co.uk<->mcvax!zen.co.uk!frank] Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048 x217