Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!sco!rogerk From: rogerk@sco.COM (Roger Knopf 5502) Newsgroups: comp.unix.xenix Subject: Re: corrupted files Message-ID: <939@scorn.sco.COM> Date: 29 Dec 89 02:10:45 GMT References: <840@stsim.ocs.com> <1989Dec22.144927.28752@xicom.uucp> Sender: news@sco.COM Reply-To: rogerk@sco.COM (Roger Knopf 5502) Organization: The Santa Cruz Operation, Inc. Lines: 40 In article <840@stsim.ocs.com> glenn@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 ". 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: 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