Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
lzjamao
V2EX  ›  Linux

Mingw64,路径的反斜杠被转义。什么设置它不转义呢?

  •  
  •   lzjamao · Aug 3, 2016 · 4388 views
    This topic created in 3759 days ago, the information mentioned may be changed or developed.
    简单来说:
    有文件 aa\bb\FILE.txt
    打开 Mingw64 ,执行命令
    $ rm aa\bb\FILE.txt
    rm: cannot remove 'aabbFILE.txt': No such file or directory

    这个问题
    在 Windoww Mingw64 执行 svn status 时碰到。
    svn status 所输出的文件路径都是以'\'分隔路径。
    至于 svn delete 鼠标中键选中文件时,删除失败。

    我想知道
    1. 不使用双引号包住路径
    2. 不将反斜杠改为斜杠
    如何取消转义。

    感激不尽
    4 replies  •  2016-08-04 05:30:02 +08:00
    qnnnnez
    qnnnnez
    Aug 3, 2016 via Android
    1
    看起来你在用 bash
    win32 可以兼容 /的,只是 cmd 不兼容 /
    lslqtz
    lslqtz
    Aug 4, 2016
    2
    lslqtz@PC-Win10 MINGW64 ~
    $ aa\bb\cc.txt
    bash: aabbcc.txt: command not found

    lslqtz@PC-Win10 MINGW64 ~
    $
    确定是这样了。。
    lslqtz
    lslqtz
    Aug 4, 2016
    3
    lslqtz@PC-Win10 MINGW64 ~
    $ "aa\bb"
    bash: aa\bb: No such file or directory

    lslqtz@PC-Win10 MINGW64 ~
    $
    lslqtz
    lslqtz
    Aug 4, 2016
    4
    lslqtz@PC-Win10 MINGW64 ~
    $ aa\\bb
    bash: aa\bb: No such file or directory

    lslqtz@PC-Win10 MINGW64 ~
    $
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2476 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 11:45 · PVG 19:45 · LAX 03:45 · JFK 06:45
    ♥ Do have faith in what you're doing.