windows - 如何在 bash 脚本中访问/cygdrive/c/..?

标签 windows bash cygwin

为什么找不到文件夹?我仔细检查它是否存在。

#!/bin/bash
echo "This will sync the background_docs folder"
lftp ftp://user:pass@server.org -e "mirror -r /cygdrive/c/Users/usera/Desktop/test_folder/ --only-missing -e;exit"

最佳答案

我建议看看cygpath

cyg路径-w

converts to windows path

cygpath -u

converts to unix path

关于windows - 如何在 bash 脚本中访问/cygdrive/c/..?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6477198/

相关文章:

windows - WcsGetDefaultColorProfile 的代码示例

c - 我如何在 win32 平台上用 C 实现时间驱动的任务?

linux - 通过符号链接(symbolic link)调用时如何在脚本本身内部获取脚本文件路径

python - 如何检查脚本是从终端调用还是从另一个脚本调用

Cygwin 和 "failed to run aclocal: No such file or directory"

c# - 在窗口出现之前拦截并隐藏它

c++ - 如何从命令行 (Windows 7) 编译和运行项目?

bash - bash中大括号内的感叹号和哈希

c - C 中的 POSIX 到 DOS 以及 DOS 到 POSIX 路径转换

shell - 简单的 shell 脚本可以在 cygwin 中运行,但不能在 solaris 上运行