corrupted files

Roger Knopf 5502 rogerk at sco.COM
Fri Dec 29 13:10:45 AEST 1989


In article <840 at stsim.ocs.com> glenn at stsim (glenn ford) writes:
>I am running SCO386 2.3.1, and have a problem.  There are several (15-20)
>corrupted files in my root directory that I can't seem to delete.  I have
>tried 'rm -i *', but when I come across the corrupted file it just says
>non-existent, and goes onto the next file.  Is there a way to delete these
>files?? In prvious problems such as this I would do rm -r, but I can do
>it this time since the bad files are in the ROOT directory.  Any help
>would be greatly appreciated, thank you.

What this really is are files with non-printing characters in their
file names. Getting rid of them is easy using wild cards and od (to
find them).

To make an example, I created one using "touch <F1>". Since my
terminal is a Wyse 60, it created a file named CTRL-A@ but since
CTRL-A isn't a printable character, it shows up in my directory
as simply "@".

To find it, I used "od -c ." to produce this output:

    <several lines deleted>
    0002520 370 032   3   .   2   d   i   s   c   u   s   s  \0  \0  \0  \0
    0002540 367 030   d   e   a   d   .   a   r   t   i   c   l   e  \0  \0
    0002560   b 020   d   e   a   d   .   l   e   t   t   e   r  \0  \0  \0
    0002600   ; 032 001   @  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
    0002620

The first column is the octal address within the file, the second two are
the inode number.  Everything else on each line is the file name. When
searching for these kinds of files, I look for file names with octal
values or escaped characters in them. The last line is the one we want
to delete.

Remove it using "rm ?@", the "?" being the wild card for one character.
Usually these little monsters have a lot of stuff, I usually use just
enough to actually match and follow it with "*".

Roger Knopf
SCO Consulting Services



More information about the Comp.unix.xenix mailing list