Xref: utzoo unix-pc.general:2139 comp.sys.att:5383 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!rutgers!att!ttrdc!ttrde!pfales From: pfales@ttrde.UUCP (Peter Fales) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: Problem removing a file Summary: Cute trick Message-ID: <836@ttrde.UUCP> Date: 30 Jan 89 02:27:20 GMT References: <695@flatline.UUCP> Organization: AT&T, Skokie, IL Lines: 21 In article <695@flatline.UUCP>, erict@flatline.UUCP (The Evil Mel Fujitsu) writes: > Ok, I've really done it now. I've created, in my home directory, > a file by the name of: > -ef It was almost a religious experience when I found a general solution to this kind of problem: 1) ls -i (to get the inode number of the file. Call it N) 2) find . -inum N -print -exec rm {} \; It works on every problem I have had: names with spaces, names with my KILL or INTR characters, names starting with '-', etc. Disclaimer: Your mileage may vary. -- Peter Fales AT&T, Room 2F-217 200 Park Plaza UUCP: ...att!ttrde!pfales Naperville, IL 60566 Domain: pfales@ttrde.att.com work: (312) 416-5357