[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Deleting Files beginning with -



On Thu, May 08, 2003 at 10:19:20AM +0200, Kay-Michael Voit wrote:
> Hi,
> I have a file beginning with "-". If I try to delete ist, rm says
> "invalid option". Same thing when I set " or '. How can I delete it?
 
rm -- -

The -- says "the following characters aren't options"

Neat trick, do:

$ touch -- -i

In a directory you care about.

rm would see that as an option and prompt you if you try to delete a
file there. :)

-- 
Danie Roux *shuffle* Adore Unix




Reply to: