Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ulysses!hector!ekrell From: ekrell@hector.UUCP (Eduardo Krell) Newsgroups: comp.unix.wizards Subject: Re: Dot files always first in directory? Message-ID: <11493@ulysses.homer.nj.att.com> Date: 5 May 89 14:37:15 GMT References: <11108@bloom-beacon.MIT.EDU> <3540@udccvax1.acs.udel.EDU> <2778@buengc.BU.EDU> Sender: netnews@ulysses.homer.nj.att.com Reply-To: ekrell@hector.UUCP (Eduardo Krell) Organization: AT&T Bell Laboratories Lines: 14 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. That's because "ls" sorts the directory entries by default. The original question was about readdir() which doesn't. Use "od" or write a small program using opendir() and readdir() and you'll see that "." and ".." are the first and second entries. Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com