On 20 Nov 2002 09:40:31 -0800, in comp.os.linux.admin,
>Hi,
>I managed to create a file called "--remove-files" when creating a tar
>archive, and now cannot remove it. I've tried escaping the dashes in
>various ways, but rm interprets it as a switch, so refuses to let me
>remove it.
Try
cd /path/to/directory
rm ./--remove-files
or
rm /path/to/directory/--remove-files
or (if you have the GNU enhanced 'rm')
cd /path/to/directory
rm -- --remove-files
The first two suggestions work with *any* rm (or *any* other app, for that
matter), while the last suggestion depends on the 'rm' app recognizing the
special '--' option (some 'rm' apps dont recognize that option).
Lew Pitcher, Information Technology Consultant, Toronto Dominion Bank Financial Group
(Opinions expressed are my own, not my employer's.)