Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!ccicpg!cci632!tvf From: tvf@cci632.UUCP (Tom Frauenhofer) Newsgroups: comp.unix.wizards Subject: Re: Dot files always first in directory? Message-ID: <28440@cci632.UUCP> Date: 8 May 89 16:33:08 GMT References: <19473@adm.BRL.MIL> Reply-To: tvf@ccird7.UUCP (Tom Frauenhofer) Organization: CCI, Communications Systems Division, Rochester, NY Lines: 21 In article <19473@adm.BRL.MIL> mchinni@pica.army.mil (Michael J. Chinni, SMCAR-CCS-E) writes: >> From: "Jonathan I. Kamens" >> It it safe to assume when writing a program which manipulates >> directories that . and .. will always be the first two entries in a >> directory? >On our systems (DoD Army) we have a program which uses several files that >begin with a "," for storage. These all apear before "." and ".." in the >directory listings. Were you using the sorting options on your listing commands? Just because the listing is displayed in some order doesn't mean that the files in that directory are laid out in that order. BTW, I wouldn't depend on "." and ".." being the first two listings in a directory. It may be a convention, but I fail to see how hard it would be to just write a little extra code to skip these entries when you find them. Thomas V. Frauenhofer ...!rutgers!rochester!cci632!ccird7!tvf *or* ...!rochester!cci632!ccird7!frau!tvf *or* ...!rochester!rit!anna!ma!tvf1477 FRAU BBS: (716) 227-8094 2400/1200/300 baud - log in as "new" to register