SUMMARY: Remove files/directories whose name start with a dash

From: Loris Serena <Loris.Serena_at_esat.com>
Date: Wed Mar 02 2005 - 06:26:04 EST
Quick and easy:

rm ./-filename
or
rm -- -filename


Thanks for your lightening fast replies...

Loris




-----Original Message-----
From: Loris Serena 
Sent: 02 March 2005 11:03
To: 'sunmanagers@sunmanagers.org'
Subject: Remove files/directories whose name start with a dash


Hi List, 

This MUST have been posted before but I don't seem to be able to find it,
either in the list archives or with google.

I ended up with one file and one directory whose filename begins with a dash
sign. I've always been able to get rid of those with (careful!) rm -i * and
answering yes or no accordingly.

This time, no joy!

I'm on a V480 running Solaris 9 112233-11.
I tried both /bin/sh and /usr/bin/bash to no avail.

Ideas anybody?

TIA

Loris





Esat Telecommunications Limited 
is a wholly owned subsidiary of BT Group plc 
Registered in Ireland, Registration No. 141524 
Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland 

This electronic message contains information (and may contain files) from
Esat Telecommunications Limited which may be privileged or confidential. The
information is intended to be for the sole use of the individual(s) or
entity named above. If you are not the intended recipient be aware that any
disclosure, copying, distribution or use of the contents of this information
and or files is prohibited. If you have received this electronic message in
error, please notify us by telephone or email (to the numbers or address
above) immediately. http://www.esatbt.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



Esat Telecommunications Limited 
is a wholly owned subsidiary of BT Group plc 
Registered in Ireland, Registration No. 141524 
Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland 

This electronic message contains information (and may contain files) from
Esat Telecommunications Limited which may be privileged or confidential. The
information is intended to be for the sole use of the individual(s) or
entity named above. If you are not the intended recipient be aware that any
disclosure, copying, distribution or use of the contents of this information
and or files is prohibited. If you have received this electronic message in
error, please notify us by telephone or email (to the numbers or address
above) immediately. http://www.esatbt.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Mar 2 06:26:38 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:44 EST