Problem removing a file
Eric Siegerman
eric at becker.UUCP
Mon Feb 13 16:34:33 AEST 1989
In article <836 at ttrde.UUCP> pfales at ttrde.UUCP (Peter Fales) writes:
> In article <695 at flatline.UUCP>, erict at 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 at kneller.UUCP, eric at becker.UUCP, ...!utzoo!mnetor!becker!kneller!eks
More information about the Unix-pc.general
mailing list