Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix Subject: Re: Funny filenames: in the nick of time! Message-ID: <2326@sun.uucp> Date: Thu, 20-Jun-85 04:29:30 EDT Article-I.D.: sun.2326 Posted: Thu Jun 20 04:29:30 1985 Date-Received: Sun, 23-Jun-85 00:57:49 EDT References: <1217@uwmacc.UUCP> Distribution: net Organization: Sun Microsystems, Inc. Lines: 29 > Thanks for all the replies; I'll summarize here and add a wrinkle. > Basically, if you have file names with the eighth bit set, then nothing > except a clri followed by a fsck will get rid of it. In 2.8BSD, none > of the various versions of "rm -i", "rm -f", "rm *", "rm -r", etc. work. > ... My only remaining question: why in the world does UNIX allow > file names to be created that cannot be referred to? Some of unlink's > fancy protection should be copied over to whatever creates directory > entries. The UNIX kernel doesn't allow file names to be created that cannot be referred to. Except in 4.2BSD, however, it *does* allow file names to be created that cannot be conveniently referred to using any of the current UNIX shells. Both the Bourne and C shells (and, I think, the V6 shell; I don't know about the Korn shell) use the eighth bit internally as a quoting indicator, and strip it off before passing arguments to commands. As such, the only way to access those files is to get the pathname into a program using something other than the shell. There may be a problem in 2.9BSD that permits you to create files with characters in their names with their eighth bit on, but not to delete them. V7, 4.1BSD, System III, and System V permit you to create them and delete them. If a 8-bit character set is chosen for UNIX's use in international environments, somebody's going to have to fix the shells (and rip the code out of 4.2BSD that disallows characters with their eighth bit on in file names). Guy Harris