Re: Deleting weird-named files
On Wednesday 06 April 2005 12:17 pm, Ed Curtis wrote:
> I recently tried to tar a directory and used the --exclude= tag. I wound
> up making a file called --exclude=*.jpg. I can't seem to delete this file
> even using '--exclude=*.jpg'. It keeps trying to take the -- as a command
> option. How can I delete this file?
>
> Thanks,
>
> Ed
Whenever I get stuck with filenames that included wildcards, I've tried two
things, the first sometimes works, the 2nd has always worked:
1) I try specifying the file to delete with wildcards that will match ONLY
that file (or files). Sometimes tab completion can help with forcing bash to
supply the filename with proper escaped characters.
2) When all else fails, I go to the directory in Konqueror, and delete the
file from Konq. It's never failed. I don't know if Gnome's file manager (or
other file managers) will do the same, since I haven't tried.
Hal
Reply to: