Problem removing a file

Scott Bartram scott at keysec.UUCP
Mon Jan 30 11:09:23 AEST 1989


 Having run up against this problem on various occasions, I can offer several
solutions:

First, find the real name of the file:
  
  1. use "ls -b" to display non-printing chars in octal, or if this fails
  2. type "od -c . | more". This will display the current directory (including
     removed files). It will look something like this:

0000000 004 271   .  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000020 001 023   .   .  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040 004 302   .   p   r   o   f   i   l   e  \0  \0  \0  \0  \0  \0
0000060 003   ;   .   o   l   d   n   e   w   s   r   c  \0  \0  \0  \0
0000100 000 000   .   r   n   h   e   a   d  \0  \0  \0  \0  \0  \0  \0

  Lines with "000 000" are deleted files.

  So now you should know the actual file name.

Second, remove the file:

  1. try using "echo":

    rm `echo "foo\007bar"`

  2. write a simple C program:

    main()
    {
      unlink("foo\377bar");
    }

-scott
-- 
=============================================================
Scott Bartram                         Key Systems Engineering
VOICE: +1 301 731 7310                4404 Cavalcade Ct.
EMAIL: uunet!keysec!scott             Burtonsville, MD 20866



More information about the Unix-pc.general mailing list