Linux

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • How to delete the following file

    1 answers - 1120 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    11Sep2006 10:47, Calvin Webster <cwebster (AT) ec (DOT) rr.comwrote:
    | 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,
  • No.1 | | 1569 bytes | |

    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.

    Webster

    Mon, 2006-09-11 at 21:20, Cameron Simpson wrote:
    11Sep2006 10:47, Calvin Webster <cwebster (AT) ec (DOT) rr.comwrote:
    | 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,

Re: How to delete the following file


max 4000 letters.
Your nickname that display:
In order to stop the spam: 5 + 4 =
QUESTION ON "Linux"

EMSDN.COM