Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpcc05!hpcc01!lthompso From: lthompso@hpcc01.HP.COM (Larry L. Thompson) Newsgroups: comp.unix.wizards Subject: Re: remove this file... Message-ID: <2620001@hpcc01.HP.COM> Date: 5 Jun 91 19:33:36 GMT References: <1991Jun4.233032.14860@cs.odu.edu> Organization: HP Corp Computing & Services Lines: 36 / hpcc01:comp.unix.wizards / priest@cs.odu.edu (Travis L Priest) / 4:30 pm Jun 4, 1991 / hopefully someone finds this challenging: I recently had a file in my dirctory that was incidentally created by a program I ran. `ls` reported it's name as "N???BZ? " and upon trying to remove it, it logged me out. (I used file completion in tcsh to expand it's name, and I also used the wildcard N*). Using dired mode in emacs I was able to remove it with no problem, and I did notice that the filename consisted of a series of control codes. >My question is: How do you remove a file whose name contains the >"logout" control sequence using standard commands available to sh, >csh, or tcsh (useful on a system that does not have emacs)? I do not >know how to create the file again so that I can try to solve this >problem, so if anyone knows how to do that, too, I would like to hear >about it. > My favorite incantation for this kind of stuff is to remove the inode directly. You might be supprised to find out how many control and escape characters can be placed in a file. ls -i gives you the inode number of the file find . -inum -exec /bin/rm {} \; Larry ------------------------------------------------------------------------------ Larry L. Thompson Hewlett-Packard Co. Unix: lthompso@hpcmfs.corp.hp.com 3500 Deer Creek Rd 26U-13 HPDesk: larry_l_thompson@hp0000 Palo Alto, CA. 94304 Tel: (415) 857-4437