Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!shadooby!accuvax.nwu.edu!tank!ncar!ames!ig!bionet!agate!garnet.berkeley.edu!ked From: ked@garnet.berkeley.edu (Earl H. Kinmonth) Newsgroups: comp.unix.xenix Subject: Re: need help for SCO Xenix Sys V 286. ver 2.1.3 Keywords: removal of odd files, files have non-ascii chars in name! Message-ID: <23843@agate.BERKELEY.EDU> Date: 1 May 89 16:31:37 GMT References: <1689@wasatch.utah.edu> <23770@agate.BERKELEY.EDU> <529@bilver.UUCP> Sender: usenet@agate.BERKELEY.EDU Organization: University of California, Berkeley Lines: 24 >find . -inum xxx -print -exec rm {} \; The solution you describe will fail in several cases. If the odd file names begin with a hyphen, they will usually be treated as options for rm. Depending on what the offending name is, you may get more than you wanted or nothing. The solution you describe will fail if the file name contains blanks, tabs, newlines, or carriage returns. I have had several cases of programs producing file names with ^M in them. Since exec forks a shell, the ^M will be removed and rm will not see the proper file name. The simplest way to get rid of all weird names is the one I originally Earl H. Kinmonth History Department University of California, Davis 916-752-1636 (voice, fax [2300-0800 PDT]) 916-752-0776 secretary ucbvax!ucdavis!ucdked!cck proposed. unlink() will take any string literally. An amateur C programmer with unitialized pointers can produce file names with almost anything in them.... (I know from experience.)