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 respond to this person; he's not a member of
> the list and is using nefarious methods to post to it.
>


Background:

https://lists.fedoraproject.org/pipermail/advisory-board/2013-May/011982.html


-- 
***  E-Mail is NOT a SECURE channel  ***
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte & Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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 would break without…lesson learned :)
Laurent
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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.





John
-- 
In today's online world, what your mother told you is true, only more so:
people really can judge you by your friends.

-- Harold Abelson, MIT computer science professor, on personal information
that can be gleaned from social networking sites, NY Times, 17 March 2010


pgpbV5AD8WyOm.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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 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@munich]~% print $SHELL
/bin/zsh
[benfell@munich]~% touch -- --DoingMyselfIn
[benfell@munich]~% ls -al -- --DoingMyselfIn
-rw-rw-r-- 1 benfell benfell 0 Apr  2 18:10 --DoingMyselfIn
[benfell@munich]~% rm -- --DoingMyselfIn
[benfell@munich]~% ls -al -- --DoingMyselfIn
ls: cannot access --DoingMyselfIn: No such file or directory
[benfell@munich]~% 

-- 
David Benfell 
See https://parts-unknown.org/node/2 if you don't understand the
attachment.


pgpRaowLNoy56.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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 "--" ending _all_ argument
parsing and anything after being a parameter and not a command argument.

Apparently zsh handles this differently from what was stated here
earlier.  If this is indeed the case this is arguably a zsh bug.

> Should I always strip the cc when posting to this list?

Nah, just lease Reindl off :)




John
-- 
Failure is the condiment that gives success its flavor.

-- Truman Capote (1924-1984), American writer, Portraits and Observations,
   The Essays of Truman Capote, "Self Portrait" (1972)


pgpFO154rvd6o.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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* *it*.

Please ignore and do not respond to this person; he's not a member of
the list and is using nefarious methods to post to it.





John
-- 
Space isn't remote at all.  It's only an hour's drive away if your car could
go straight upwards.

-- Fred Hoyle (1915-2001), British astronomer and science fiction author,
   "Sayings of the Week", The Observer (9 September 1979)


pgpOQdczfTgpg.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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
string even gets to the command.

Should I always strip the cc when posting to this list?

-- 
David Benfell 
See https://parts-unknown.org/node/2 if you don't understand the
attachment.


pgpd9pphFkzaT.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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 
> function and *this* *isn't* *it*.
> 
Don't feed the trolls, and be careful of the CC. He's not on the
mailing list proper for a reason.


- -- 
Jim Perrin
The CentOS Project | http://www.centos.org
twitter: @BitIntegrity | GPG Key: FA09AD77
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJTPJdgAAoJEBbHyC76Ca13dscQAJ4V87lMohD+QN6gBsBzrokj
JkS/zrGPAgA1B1Fs2DL7eGWrrBmXzPzdlgFiIKG+5YZyJowTVd/Kwfd034UVCP2+
4etcj3Tq2yveNobLXbDa5SMmiRohAm7vOZ+ngwYOLki4MemX0SfrS1mO3FeBkhC5
syLr2acz0oAJufPZM03VMJnbTAlUB0pa1Xk2vX+SpNCG2ISQe3Z0rEUJjiq/CaHv
Q48hNsHoXjcLrRpPlu7chOmtEa32Woldh/xkwm9AF/gKql5AXscXjjez/0gxETGG
/DNdOmrUx+CfR5kIOWnfa5PyW9wJL02kX6KTOgL/8Tz7FEmQ655JGazJEDkSfh9k
45DModiEqtYRJPNyaswSy3sI1ZJB1l/5pExH9RbgEsNRGliRarRN4KRjpuiuXcJd
+jpSyUy9PXtDKA8mfkLcwckJDHYfr6yKxvPRvSRr8q3VMNzR1QIwg/0otbPO4hvw
i/6YDYmOHJwSBzO+FAMFnEwwRldEZHatCQlu5LtG88HXMZNorYq8dplwvWlDDOnr
GCn2bKsmaph1JfcRVu1/FIsfY9YlUz7R1Wu3rC8E/jRJ73jBbOAKjgjSBuiwTx4F
nkDexxEYHfq3Mzed3HhtlgUZPXXxcIC7TU++GAywlLrKqXJ9t/81hGgw40u68zuX
Lag4Bxh8uthHJrbbyogX
=AeUP
-END PGP SIGNATURE-
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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 understand the
attachment.


pgpV5XyoEgnkD.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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. ;-)

:)




John
-- 
What happened should never, ever have happened.  The families of those who
died should not have had to live with the pain and hurt of that day, and a
lifetime of loss.

-- Prime Minister David Cameron of Britain, apologizing for the Bloody Sunday
   killings of 14 unarmed demonstrators by British soldiers in Londonderry,
   Northern Ireland, in 1972, New York Times, 16 June 2010


pgp_aS7otCDg8.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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
attachment.


pgpOdZFUjGdN0.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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 me. I know the double dash is supposed to
> stop interpretation of arguments, but it hasn't worked for me.

I do not post solutions unless they work:


tty3 jrd@frodo:/tmp/jrd$ ls -l
total 0
-rw-rw-r--. 1 jrd jrd 0 Apr  2 16:14 --silly-file-name
tty3 jrd@frodo:/tmp/jrd$ rm -- --silly-file-name
rm: remove regular empty file `--silly-file-name'? y
tty3 jrd@frodo:/tmp/jrd$ ls
tty3 jrd@frodo:/tmp/jrd$

What shell are you using?  Perhaps that is interfering.




John
-- 
The most valuable thing you can make is a mistake - you can't learn
anything from being perfect.

-- Adam Osborne (1939-2003), American entrepreneur


pgpfWQY4_Lda1.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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 hasn't worked for me.

-- 
David Benfell 
See https://parts-unknown.org/node/2 if you don't understand the
attachment.


pgphc9TKNIsHF.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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
> filenames with weird, or unprintable, stuff in the name.
>
> mark
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
Use rm -i *
It will usually catch the file and because it's a special character it 
and many other odd ball file names usually appear in the very beginning 
so you don't have to go through the entire list.

-- 
Unencumbered by the thought process.
  -- Click and Clack the Tappet brothers

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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.ehu.es/ref/unixfaq.html#2.1

-- 

rgds
Stephen
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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

2014-04-02 Thread Frank M. Ramaekers
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.

> -Original Message-
> From: centos-boun...@centos.org [mailto:centos-boun...@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?
> >
> > -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/listinfo/centos
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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
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
filenames with weird, or unprintable, stuff in the name.

   mark

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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: [CentOS] Removing a file that starts with dashes
> 
> 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 understand).
> 
> rm -- --backup=numbered
> 
> -- stops the processing of command line arguments so any file name
after will
> be interpreted literally.
> 
> 
> 
> 
>   John
> --
> "Worry never robs tomorrow of its sorrow, it only saps today of its
joy."
> 
> ~~   Leo Buscaglia
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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 most attempts interprets the
> file name as a switch (which it doesn't understand).
>
>
>
> TIA,
>
> Frank M. Ramaekers Jr. | Systems Programmer | Information Technology |
> American Income Life Insurance Company | 254-761-6649
>
>
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos



-- 
-
Hal Wigoda
Chicago
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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 dashes

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 Technology |
American Income Life Insurance Company | 254-761-6649

 

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


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/listinfo/centos


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 understand).

rm -- --backup=numbered

-- stops the processing of command line arguments so any file name after
will be interpreted literally.




John
-- 
"Worry never robs tomorrow of its sorrow, it only saps today of its joy."

~~   Leo Buscaglia


pgpFPupekjSnM.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[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 Technology |
American Income Life Insurance Company | 254-761-6649

 

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos