remove this file...

Larry L. Thompson lthompso at hpcc01.HP.COM
Thu Jun 6 05:33:36 AEST 1991


/ hpcc01:comp.unix.wizards / priest at 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 <inode number> -exec /bin/rm {} \;


Larry
------------------------------------------------------------------------------
Larry L. Thompson                       Hewlett-Packard Co. 
Unix:   lthompso at hpcmfs.corp.hp.com     3500 Deer Creek Rd 26U-13
HPDesk: larry_l_thompson at hp0000         Palo Alto, CA.  94304
Tel: (415) 857-4437                     



More information about the Comp.unix.wizards mailing list