Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Ghost file Message-ID: <489@auspex.UUCP> Date: 22 Nov 88 20:57:25 GMT References: <17529@adm.BRL.MIL> <8430@alice.UUCP> <169@pinn.UUCP> <303@bilver.UUCP> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 28 >I tried that (rm -i *) with a ghost file and it did NOT work. Dumped the >directory and found that the file name had a printable letter, 0x08, and two >more letters. The 0x08 (backspace) effectively masked the first letter. >rm -i * would prompt with the name, and then give a file not found error. The only way I can believe that story is true is if you have an excessively helpful shell, or if some of the "printable" letters really had their 8th bit set and you had an insufficiently helpful shell. If the file's name is "fduck", where "" refers to the "backspace" character, doing "rm -i *" under a sane Bourne, Korn, or C shell would cause "rm" to print something like rm: remove duck? (the word "remove" may be absent, depending on your UNIX version), and if you say "y" it will quite cheerfully remove the file whose name it printed - that name is "fduck", which happens to print as "duck" on most terminals these days. No shell I know of will remove the printable letter and backspace, nor will any UNIX kernel I know of. If the 8th bit is set, the shell might strip the 8th bit off before passing it to "rm", in which case "rm" will not have the proper name of the file and will not be able to remove it. Versions of the Bourne shell prior to the System V Release 3 version, and versions of the C shell from Berkeley, will strip the 8th bit (as they use that bit internally for quoting). The System V Release 3 Bourne shell (present in SunOS 4.0 and later) will not strip the 8th bit.