[CentOS] Removing a file that starts with dashes

benfell at parts-unknown.org benfell at parts-unknown.org
Thu Apr 3 01:13:05 UTC 2014


On Wed, Apr 02, 2014 at 07:59:28PM -0500, John R. Dennison wrote:
> On Wed, Apr 02, 2014 at 04:46:51PM -0700, benfell at parts-unknown.org wrote:
> > 
> > This issue is all about shell interpretation--before the command
> > string even gets to the command.
> 
> Apparently zsh handles this differently from what was stated here
> earlier.  If this is indeed the case this is arguably a zsh bug.
> 
I don't know. I couldn't reproduce the behavior today:

[benfell at munich]~% print $SHELL
/bin/zsh
[benfell at munich]~% touch -- --DoingMyselfIn
[benfell at munich]~% ls -al -- --DoingMyselfIn
-rw-rw-r-- 1 benfell benfell 0 Apr  2 18:10 --DoingMyselfIn
[benfell at munich]~% rm -- --DoingMyselfIn
[benfell at munich]~% ls -al -- --DoingMyselfIn
ls: cannot access --DoingMyselfIn: No such file or directory
[benfell at munich]~% 

-- 
David Benfell <benfell at parts-unknown.org>
See https://parts-unknown.org/node/2 if you don't understand the
attachment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20140402/99bd8aa1/attachment.sig>


More information about the CentOS mailing list