Xref: utzoo unix-pc.general:2226 comp.sys.att:5527 Path: utzoo!censor!becker!eric From: eric@becker.UUCP (Eric Siegerman) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: Problem removing a file Summary: Published solution using "find" might do too much. Message-ID: <292@becker.UUCP> Date: 13 Feb 89 06:34:33 GMT References: <695@flatline.UUCP> <836@ttrde.UUCP> Reply-To: eric@becker.UUCP (Eric Siegerman) Organization: There ain't no organization here. Lines: 26 In article <836@ttrde.UUCP> pfales@ttrde.UUCP (Peter Fales) writes: > 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 > [...] > 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: > [...] > Disclaimer: Your mileage may vary. Your mileage might in fact be *greater* than expected: if you originally messed yourself up by ln good_file garbage_name the recommended approach will happily remove both links to your file! The simplest approach to erict's specific problem (while admittedly not a general solution) is rm ./-ef -- Eric Siegerman, Toronto, Ont. eks@kneller.UUCP, eric@becker.UUCP, ...!utzoo!mnetor!becker!kneller!eks