Are . and .. first?
Ron Kuris
rk at unify.UUCP
Sat May 6 06:55:47 AEST 1989
In article <3540 at udccvax1.acs.udel.EDU> conan at vax1.acs.udel.edu (CONAN THE BARBARIAN) writes:
>In article <11108 at bloom-beacon.MIT.EDU> jik at athena.mit.edu (Jonathan I. Kamens) writes:
>>
>>It it safe to assume when writing a program which manipulates
>>directories that . and .. will always be the first two entries in a
>>directory?
>>
>
>NO, its not save to assume that.
>try "touch #abcd" then 'list' the directory.
>
I did this, and then said "od -c <dirname>" and lo and behold -- . and ..
were first! Remember that ls sorts files before outputting them.
Ron Kuris (916) 920-9092
rk at unify.UUCP
{{ucdavis,csun,lll-crg}!csusac,pyramid,sequent}!unify!rk
--
Ron Kuris (916) 920-9092
rk at unify.UUCP
{{ucdavis,csun,lll-crg}!csusac,pyramid,sequent}!unify!rk
More information about the Comp.unix.wizards
mailing list