Removing funny files (Re: how do i remove a file with a ~ in it ????)

Removing funny files (Re: how do i remove a file with a ~ in it ????)

Post by Erwin Fri » Sat, 02 Apr 1994 11:11:49




Quote:>>This question or ones like it (how do I remove a file named <whatever>) keeps
>>coming up every so often.  I have a surefire way to remove any file, strangely
>>named or not.  It works for EVERY question like this I've ever seen.
>>Just do this:

>>rm -i * .*

>>and answer 'n' to every prompt except the one relating to the
>>troublesome file.  This is guaranteed to work.
>If there is a file named '-' (i.e., a single hyphen), this method will
>unfortunately not work.  At least this doesn't work for a file named
>'-' under SunOS 4.1.3 and Solaris 2.3.
>I believe that what should be typed instead is ...
>  rm -i ./* ./.*

As the person who posted the 'rm -i' solution, I have this to say:  you're right.
I stand (sit, actually) corrected.

--