V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
lzjamao
V2EX  ›  Linux

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

  •  
  •   lzjamao · 2016-08-03 17:42:45 +08:00 · 3307 次点击
    这是一个创建于 2829 天前的主题,其中的信息可能已经有所发展或是发生改变。
    简单来说:
    有文件 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 条回复    2016-08-04 05:30:02 +08:00
    qnnnnez
        1
    qnnnnez  
       2016-08-03 17:57:17 +08:00 via Android
    看起来你在用 bash
    win32 可以兼容 /的,只是 cmd 不兼容 /
    lslqtz
        2
    lslqtz  
       2016-08-04 05:28:04 +08:00
    lslqtz@PC-Win10 MINGW64 ~
    $ aa\bb\cc.txt
    bash: aabbcc.txt: command not found

    lslqtz@PC-Win10 MINGW64 ~
    $
    确定是这样了。。
    lslqtz
        3
    lslqtz  
       2016-08-04 05:28:56 +08:00
    lslqtz@PC-Win10 MINGW64 ~
    $ "aa\bb"
    bash: aa\bb: No such file or directory

    lslqtz@PC-Win10 MINGW64 ~
    $
    lslqtz
        4
    lslqtz  
       2016-08-04 05:30:02 +08:00
    lslqtz@PC-Win10 MINGW64 ~
    $ aa\\bb
    bash: aa\bb: No such file or directory

    lslqtz@PC-Win10 MINGW64 ~
    $
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2266 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 06:06 · PVG 14:06 · LAX 23:06 · JFK 02:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.