You can also put your file name in single quotes  rm '- - exclude'
A third option if the directory is small, is rm -i * and answer n to everything but 
the file you want to remove.


 -----Original Message-----
From:   Brian Ashe [mailto:[EMAIL PROTECTED]] 
Sent:   Thursday, January 16, 2003 3:41 PM
To:     [EMAIL PROTECTED]
Subject:        Re: Remove --exclude

Chris Mason,

On Thursday January 16, 2003 03:20, Chris Mason wrote:
> How do you remove a file called --exclude from the bash shell?
>
> [root@non htdocs]# rm \-\-exclude
> rm: unrecognized option `--exclude'
>
>
> I can't find a way to exclude the "-" character

Try...

rm -- --exclude

The "--" in a command tells the command there are no more flags.

-- 
Brian Ashe                                                     CTO
Dee-Web Software Services, LLC.                  [EMAIL PROTECTED]
http://www.dee-web.com/



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list




-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to