Path: utzoo!attcan!uunet!mcsun!hp4nl!kunivv1!atcmpe!ronald From: ronald@atcmp.nl (Ronald Pikkert) Newsgroups: comp.unix.wizards Subject: Re: Removing garbage files Message-ID: <610@atcmpe.atcmp.nl> Date: 2 Jun 90 21:00:53 GMT References: <156@TWG.UUCP> Organization: AT Computing, Nijmegen, The Netherlands Lines: 32 From article <156@TWG.UUCP>, by bill@TWG.UUCP (Bill Irwin): > Here is one that has got me beat, frustrated and down right angry. I > have some files in a directory that I can't remove. Your shell probably strips the high order bit which causes rm to be unable to delete these files. You can remove them using a c-program. I wrote a shell script that creates a c-program that does the job: ------------------- cut here ------------------ echo "main() {" ls -b | sed 's/\(\\\)\([^0]\)/\10\2/g s/\\$/\\\\/ s/"/\\"/g s/^/unlink(\"/ s/$/");/ ' echo "}" ------------------- cut here ------------------ Run this script in the directory and it will generate a program dl.c Compile the program (cc dl.c -o dl). The run ./dl and there will be no need to reformat your anymore disk :-) - Ronald Pikkert E-mail: ronald@atcmp.nl @ AT Computing b.v. Tel: 080 - 566880 Toernooiveld 6525 ED Nijmegen