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

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

  •  
  •   lzjamao · Aug 3, 2016 · 4009 views
    This topic created in 3589 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
        1
    qnnnnez  
       Aug 3, 2016 via Android
    看起来你在用 bash
    win32 可以兼容 /的,只是 cmd 不兼容 /
    lslqtz
        2
    lslqtz  
       Aug 4, 2016
    lslqtz@PC-Win10 MINGW64 ~
    $ aa\bb\cc.txt
    bash: aabbcc.txt: command not found

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

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

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