Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!rutgers!pyrnj!dasys1!jpr From: jpr@dasys1.UUCP (Jean-Pierre Radley) Newsgroups: comp.unix.xenix Subject: Re: Weird File Names (Removing them) Message-ID: <8797@dasys1.UUCP> Date: 27 Feb 89 06:30:56 GMT References: <91@raider.MFEE.TN.US> Reply-To: jpr@dasys1.UUCP (Jean-Pierre Radley) Organization: TANGENT Lines: 32 In article <91@raider.MFEE.TN.US> root@raider.MFEE.TN.US (Bob Reineri) writes: >One of them has a file in his home directory that I can't get rid of to save >my life. In a regular 'l' listing, it has a filename of the greek letter >Sigma. Doing an l with the -b option reveals a value of '/744'. Anyone can >give me a way to delete this annoying little file ? Thanks. > >rm refuses to recognize it, even if I just try to delete all files >interactively. That is, 'rm -i *' skips over it. This question comes up every other month. When you start getting other than plain printable ASCII characters in a file name, or if you get a file name that starts with '-', you won't be able to enter a keyboard command too readily that will work for 'rm'. The expansion of '*' may not, depending on what version of which shell you're using, cover 8-bit characters; in any case, it won't encompass filenames starting with '.'. First, 'cd' to the directory-with-the-problem. Then type 'ls -i' to obtain the inode number, say NNN, of the weird filename. Then, use the '-inum' option of find (it seems to be present in all versions of find, but SCO seems to have dropped any reference to -inum in the manual page for find): find . -inum NNN -exec rm {} \; Perhaps you first want to see if the file is of interest, and find that you can't feed its name to 'cat' any more than you could feed it to 'rm'. Then: find . -inum NNN -exec mv {} newname \; -- Jean-Pierre Radley Honi soit jpr@dasys1.UUCP New York, New York qui mal ...!hombre!jpradley!jpr CIS: 76120,1341 y pense ...!hombre!trigere!jpr