Re: [CentOS] Removing a file that starts with dashes

2014-04-03 Thread James B. Byrne
On Wed, April 2, 2014 20:56, John R. Dennison wrote: > On Wed, Apr 02, 2014 at 03:59:26PM -0700, benf...@parts-unknown.org wrote: >> On Wed, Apr 02, 2014 at 11:17:02PM +0200, Reindl Harald wrote: >> > >> > WTF - there is a reason the "-f" flag exists - RTFM >> > > > Please ignore and do not respon

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread Laurent Wandrebeck
"Frank M. Ramaekers" a écrit : > rm: unrecognized option `--backup=numbered' > Try `rm ./'--backup=numbered'' to remove the file `--backup=numbered'. > Try `rm --help' for more information. > > Frank M. Ramaekers Jr. > Damn, tested it with a path/file before sending a mail, didn’t think it wou

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread John R. Dennison
On Wed, Apr 02, 2014 at 06:13:05PM -0700, benf...@parts-unknown.org wrote: > I don't know. I couldn't reproduce the behavior today: If you are able to duplicate the original behavior please let us, or at least me, know. I am curious as to what may have transpired that caused the initial problem.

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread benfell
On Wed, Apr 02, 2014 at 07:59:28PM -0500, John R. Dennison wrote: > On Wed, Apr 02, 2014 at 04:46:51PM -0700, benf...@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

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread John R. Dennison
On Wed, Apr 02, 2014 at 04:46:51PM -0700, benf...@parts-unknown.org wrote: > > This issue is all about shell interpretation--before the command > string even gets to the command. Actually, yes and no. Some commands, notably those using the GNU getopt() family, understand the concept of "--" endi

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread John R. Dennison
On Wed, Apr 02, 2014 at 03:59:26PM -0700, benf...@parts-unknown.org wrote: > On Wed, Apr 02, 2014 at 11:17:02PM +0200, Reindl Harald wrote: > > > > WTF - there is a reason the "-f" flag exists - RTFM > > > I don't know what manual you're reading. But -f has a specific > function and *this* *isn't

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread benfell
On Wed, Apr 02, 2014 at 06:04:00PM -0500, Jim Perrin wrote: > > Don't feed the trolls, and be careful of the CC. He's not on the > mailing list proper for a reason. > My apologies. I did not realize. But of course you're right. This issue is all about shell interpretation--before the command str

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread Jim Perrin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/02/2014 05:59 PM, benf...@parts-unknown.org wrote: > On Wed, Apr 02, 2014 at 11:17:02PM +0200, Reindl Harald wrote: >> >> WTF - there is a reason the "-f" flag exists - RTFM >> > I don't know what manual you're reading. But -f has a specific

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread benfell
On Wed, Apr 02, 2014 at 11:17:02PM +0200, Reindl Harald wrote: > > WTF - there is a reason the "-f" flag exists - RTFM > I don't know what manual you're reading. But -f has a specific function and *this* *isn't* *it*. -- David Benfell See https://parts-unknown.org/node/2 if you don't understan

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread John R. Dennison
On Wed, Apr 02, 2014 at 02:23:07PM -0700, benf...@parts-unknown.org wrote: > On Wed, Apr 02, 2014 at 04:16:51PM -0500, John R. Dennison wrote: > > > > What shell are you using? Perhaps that is interfering. > > > Ah. Good point. I've been using zsh for so long I forget it's even an > issue. ;-)

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread benfell
On Wed, Apr 02, 2014 at 04:16:51PM -0500, John R. Dennison wrote: > > What shell are you using? Perhaps that is interfering. > Ah. Good point. I've been using zsh for so long I forget it's even an issue. ;-) -- David Benfell See https://parts-unknown.org/node/2 if you don't understand the att

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread John R. Dennison
On Wed, Apr 02, 2014 at 02:05:08PM -0700, benf...@parts-unknown.org wrote: > On Wed, Apr 02, 2014 at 09:51:41AM -0500, Frank M. Ramaekers wrote: > > rm: unrecognized option `--backup=numbered' > > Try `rm ./'--backup=numbered'' to remove the file `--backup=numbered'. > > This is what's worked for

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread benfell
On Wed, Apr 02, 2014 at 09:51:41AM -0500, Frank M. Ramaekers wrote: > rm: unrecognized option `--backup=numbered' > Try `rm ./'--backup=numbered'' to remove the file `--backup=numbered'. This is what's worked for me. I know the double dash is supposed to stop interpretation of arguments, but it ha

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread Pete Geenhuizen
On 04/02/14 10:51, m.r...@5-cent.us wrote: > Frank M. Ramaekers wrote: > Method 1: try rm \-\-backup\=numbered > Method 2, that will *ALWAYS* work: > ls -i > then, using the inode number > find . -inum -exec rm {} \; > > The latter method is the one guaranteed to take care of all kinds of > filen

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread Stephen Harris
On Wed, Apr 02, 2014 at 09:51:41AM -0500, Frank M. Ramaekers wrote: > rm: unrecognized option `--backup=numbered' > Try `rm ./'--backup=numbered'' to remove the file `--backup=numbered'. > Try `rm --help' for more information. This is one of the oldest of oldest of Unix FAQs eg http://fisica.e

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread Frank M. Ramaekers
.@centos.org] On > Behalf Of Laurent Wandrebeck > Sent: Wednesday, April 02, 2014 9:48 AM > To: CentOS mailing list > Subject: Re: [CentOS] Removing a file that starts with dashes > > > "Frank M. Ramaekers" a écrit : > > > How can I remove this file? >

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread m . roth
Frank M. Ramaekers wrote: > How can I remove this file? > > -rw-r--r-- 1 rootroot 28707 Mar 31 12:31 --backup=numbered > > I've tried a few different methods, but most attempts interprets the > file name as a switch (which it doesn't understand). Method 1: try rm \-\-backup\=numbered Met

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread Frank M. Ramaekers
Ahhh...that's the ticket! Frank M. Ramaekers Jr. > -Original Message- > From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On > Behalf Of John R. Dennison > Sent: Wednesday, April 02, 2014 9:48 AM > To: centos@centos.org > Subject: Re: [CentO

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread Hal Wigoda
It is possible. Mask the - by putting a \ or / in front ot it. Or try: rm ./-filename On Wed, Apr 2, 2014 at 9:44 AM, Frank M. Ramaekers wrote: > How can I remove this file? > > -rw-r--r-- 1 rootroot 28707 Mar 31 12:31 --backup=numbered > > > > I've tried a few different methods, but

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread Roberto Alvarado
rm -f "\--backup=numered" Regards Roberto -Original Message- From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On Behalf Of Frank M. Ramaekers Sent: miércoles, 02 de abril de 2014 11:45 To: centos@centos.org Subject: [CentOS] Removing a file that starts with d

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread Laurent Wandrebeck
"Frank M. Ramaekers" a écrit : > How can I remove this file? > > -rw-r--r-- 1 rootroot 28707 Mar 31 12:31 --backup=numbered rm "--backup=numbered" HTH, Laurent. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listin

Re: [CentOS] Removing a file that starts with dashes

2014-04-02 Thread John R. Dennison
On Wed, Apr 02, 2014 at 09:44:57AM -0500, Frank M. Ramaekers wrote: > How can I remove this file? > > -rw-r--r-- 1 rootroot 28707 Mar 31 12:31 --backup=numbered > > > > I've tried a few different methods, but most attempts interprets the > file name as a switch (which it doesn't unde

[CentOS] Removing a file that starts with dashes

2014-04-02 Thread Frank M. Ramaekers
How can I remove this file? -rw-r--r-- 1 rootroot 28707 Mar 31 12:31 --backup=numbered I've tried a few different methods, but most attempts interprets the file name as a switch (which it doesn't understand). TIA, Frank M. Ramaekers Jr. | Systems Programmer | Information Technol