Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!tut.cis.ohio-state.edu!att!cbnewsc!nichols From: nichols@cbnewsc.ATT.COM (robert.k.nichols) Newsgroups: comp.unix.wizards Subject: Re: Dot files always first in directory? Summary: order_of_listing != order_of_directory Message-ID: <685@cbnewsc.ATT.COM> Date: 5 May 89 13:49:00 GMT References: <11108@bloom-beacon.MIT.EDU> <3540@udccvax1.acs.udel.EDU> <2778@buengc.BU.EDU> Reply-To: nichols@iexist.ATT.COM (bob.nichols) Organization: AT&T Bell Laboratories Lines: 22 In article <2778@buengc.BU.EDU> bph@buengc.bu.edu (Blair P. Houghton) writes: ... >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. ... Sorry, but the horse is still very much alive. Directory listing programs such as "ls" will, by default, list directory entries in alphanumeric order, which is NOT the same as the order in which the entries actually appear in the directory. If you want to see the actual order, use "ls -f" which skips the sorting and shows the entries in the order they actually appear (and will be found by readdir() or its equivalent). >I've actually had the fun ( yeah, right %-) ) task of trying to remove a >file called * from a directory. It's easy, _once_you_know_how_... Isn't it fortunate that "rm" doesn't try to do the filename expansion for itself?! -- .sig included a no extra charge. | Disclaimer: My mind is my own. Cute quotes and batteries sold separately. | >> Bob Nichols nichols@iexist.att.com << |