Re: How to delete the following file



No confusion here unless you don't understand that the back-slash is an
"escape" character, not part of the file name. The problem was that the
hyphen was misinterpreted by the shell as an option. Enclosing the
entire name in single-quotes, then escaping the offending character (the
hyphen), solves the problem. The hyphen is no longer misinterpreted by
the shell.

--Cal Webster

On Mon, 2006-09-11 at 21:20, Cameron Simpson wrote:
On 11Sep2006 10:47, Calvin Webster <cwebster@xxxxxxxxx> wrote:
| I was able to recreate your file name and remove it as follows:
| (one single line each)
|
| Create:
| touch '\-l `cap_to_path 0x34c23d0b 0x00008e9f 0x30298894 0xd1e6f358
| 0x030d8181 0x700400f9 0x0d818119 0x0006ff03`'

I think you have confused yourself. You have created a file whose name
commences with a backslash, not a dash.

The issue is that the file name commences with a dash, and thus
resembles an option.

The suggestions involving "--" (the "no more options" option) solve the
problem. The other workaround is to use a name not commencing with a
dash, such as the full pathname or "./the-filename-here".

For example, one easy way is:

- check that there's just the one filename:
ls -ld ./-*

- if that listed only one file, then:
rm ./-*

Very easy, and applicable for commands that don't support the "--"
option (and in contexts where the "--" option is not easy to use - rare
but occasionally encountered).

Cheers,

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: Dash in Cataloged Data Set Name (Was: ISPF and long lines)
    ... , a hyphen, or a character X'C0' " so it looks like a dash ... Subject: Dash in Cataloged Data Set Name ... I never knew dashes were legal! ...
    (bit.listserv.ibm-main)
  • Re: What Needs to Happen in Secret Invasion
    ... the comic then it MIGHT have created confusion. ... As a reader, there is ... know more than any single character in the comic. ... Captain America in Avengers is a skrull. ...
    (rec.arts.comics.marvel.universe)
  • Re: Changing Values in Fields
    ... You could try to strip out the dash before doing the comparison. ... Where A = alpha character and N = numeric character. ... I have queries that strip the suffix of all of these and store the new value in a separate field. ... "John Spencer" wrote: ...
    (microsoft.public.access.queries)
  • Re: Alphabet letters not used in Microsoft product keys
    ... I've never had any problems reading them but they leave in the 24 used set ... to avoid accidentally producing offensive-looking character ... The 4 unused consonants, LNSZ, further eliminate possible confusion ... be performing a brute-force crack attempt to generate key codes. ...
    (microsoft.public.security)
  • Re: Tell No One The movie
    ... and the sister is important to the story. ... character in the script.. ... It made for some confusion ... |> Hoffman and younger Ken Stott? ...
    (rec.arts.mystery)