Re: Deleting weird-named files
Quoting "Michael D. Crawford" <crawford@goingware.com>:
> You can use "./" to indicate a file in the current directory in a way
> that hides the "--". So try this:
>
> rm ./--exclude=*.jpg
>
> However, there is also the "*", which might cause complaints from the
> shell. If that happens, try this:
>
> rm ./--exclude=\*.jpg
>
> I'll send you my bill in the mail ;-)
Most GNU commands, rm included, support "--" as the end of options processing.
So:
rm -- <anything>
should always work.
rm -- *
rm -- --exclude=\*.jpg
etc.
Reply to: