Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 OSX 上,想将 MacOS 样式的路径(例如 Macintosh HD:Users:Shared:)转换为 POSIX 路径(例如 /Users/Shared/)。
我怎样才能做到这一点?
您可以使用 AppleScript 将旧版 Mac 路径转换为 POSIX 路径,您可以使用以下命令从 shell 调用osascript:
osascript
$ osascript -e 'POSIX path of "Macintosh HD:Users:Shared"' /Users/Shared