gpt4 book ai didi

Windows PATH 到 bash 中的 posix 路径转换

转载 作者:可可西里 更新时间:2023-11-01 12:09:13 24 4
gpt4 key购买 nike

如何将 Windows 目录路径(例如 c:/libs/Qt-static)转换为正确的 POSIX 目录路径( /c/libs/Qt-static) 通过标准 msys 功能?反之亦然?

最佳答案

Cygwin、Git Bash 和 MSYS2 有一个名为 cygpath.exe 的现成实用程序,专门用于执行此操作。

Output type options:  -d, --dos             print DOS (short) form of NAMEs (C:\PROGRA~1\)  -m, --mixed           like --windows, but with regular slashes (C:/WINNT)  -M, --mode            report on mode of file (binmode or textmode)  -u, --unix            (default) print Unix form of NAMEs (/cygdrive/c/winnt)  -w, --windows         print Windows form of NAMEs (C:\WINNT)  -t, --type TYPE       print TYPE form: 'dos', 'mixed', 'unix', or 'windows'

关于Windows PATH 到 bash 中的 posix 路径转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13701218/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com