Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Denver Mods 7/26/84) 6/24/83; site drutx.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!whuxl!houxm!mtuxo!drutx!mrl From: mrl@drutx.UUCP (LongoMR) Newsgroups: net.unix Subject: Re: Funny filenames: in the nick of time! Message-ID: <3092@drutx.UUCP> Date: Fri, 28-Jun-85 01:54:27 EDT Article-I.D.: drutx.3092 Posted: Fri Jun 28 01:54:27 1985 Date-Received: Sun, 23-Jun-85 04:23:08 EDT References: <2326@sun.uucp> Organization: AT&T Information Systems Laboratories, Denver Lines: 59 >> 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. not true. I originally replied with this one by mail, but wasn't too specific. You can edit the directory entry with fsdb, if you have it. Here's the procedure: + as root, envoke fsdb with the block device name of the file system as an argument + print the directory inode containing the bad file name (ex. if the file name is /usr/bin/ and the inode number of directory /usr/bin is 500, type "500i" to see the inode) + look at the directory entries 1 at a time until you find the bad file. "f0d" will list the 0th block in directory format "f1d" will list the next block, etc. Each entry will be proceded with a d[number]. + change the name of the file by typing d[number].name=new_file_name (ex. d3.name=XXX1) + exit fsdb with a ^D or quit + remove /usr/bin/new_file_name (in the above example use "rm /usr/bin/XXX1") I know this works on AT&T Unix since I have been using it for years. I am sorry that I can't say I am as certain that it works on Berkeley Unix. I would be curious to know whether or not it does. BTW - It is possible to create file names which cannot be refered to by the shell in AT&T Unix. It is usually accomplished by accident when garbage is given to a file descriptor name within a c program. If the eighth bit is set and you use any command to the shell, the shell will expand the name to a string containing only 7 bit ascii characters. When this name is fed to the command, the kernal will recognize the eighth bit and come up with a non-match. The usual sequence is # od -c . xxxxxxxx ? > 307 p \0 \0 \0 \0 \0... xxxxxxxx 3 5 f i l e 1 \0 \0... . . . # rm -i * p: not found (the file name is not "p", but that is what file1: the shell passed to the command. The garbage file2: isn't printed) . . . filen: Mark Longo AT&T ISL DENVER (..!ihnp4!drutx!mrl) ----------------- Don't worry whether I'm right or wrong. Someone will correct me either way!