Dot files always first in directory?

Michael J. Chinni, SMCAR-CCS-E mchinni at pica.army.mil
Sat May 6 00:11:28 AEST 1989


> From: "Jonathan I. Kamens" <jik at athena.mit.edu>
> Subject: Dot files always first in directory?
> Date: 4 May 89 13:31:57 GMT
> To:       unix-wizards at sem.brl.mil
> 
> 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.  Therefore, I would say that you cannot make you
assumption.  Also, users sometimes create files (by accident) that may begin
with some of the following characters, all of which would apear before "." and
"..": ! " # $ % & ' ( ) * + , -

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
			    Michael J. Chinni
      Chief Scientist, Simulation Techniques and Workplace Automation Team
	US Army Armament Research, Development, and Engineering Center
 User to skeleton sitting at cobweb    () Picatinny Arsenal, New Jersey  
   and dust covered terminal and desk  () ARPA: mchinni at pica.army.mil
    "System been down long?"           () UUCP: ...!uunet!pica.army.mil!mchinni
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



More information about the Comp.unix.wizards mailing list