无法识别 Windows 中的 cwrsync [英] cwrsync in windows not being recognised

查看:28
本文介绍了无法识别 Windows 中的 cwrsync的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从 mac 环境转移到 windows 环境并需要 rsync.

I am trying to move from a mac environment to a windows one and require rsync.

找到 cwrsync @ http://www.rsync.net/resources/howto/windows_rsync.html

Found cwrsync @ http://www.rsync.net/resources/howto/windows_rsync.html

我已经很好地安装了 cwrsync 程序,我可以在 cmd 中调用 rsync 但是在包含 sync.exe 的目录中时调用 rsync

I have installed the cwrsync program fine, I can call the rsync at cmd but on when in the directory which contains the sync.exe

在命令提示符下,如果我不在相关目录中调用 rsync,它会呻吟并说:

When in command prompt, if i call rsync when not in the relavent directory it moans and sayS:

"rsync" 未被识别为内部或外部命令,可操作程序或批处理文件.

"rsync" is not recognised as an internal or external command, operable program or batch file.

有没有办法将 rsync.exe 添加到全局列表中,以便在其直接父目录之外识别 rsync?

Is there a way to add the rsync.exe to a global list so as rsync is recognised outside of its immediate parent directory?

谢谢,约翰

推荐答案

在Windows系统变量中添加路径:

Add the path in the Windows system variables:

- Control Panel -> System -> tab Advanced, button Environment Variables.
- Edit the "Path" system variable and add the full path to the installed rsync:
     C:\Program Files\cwRsync\bin or C:\cygwin\bin. or
     C:\Program Files (x86)\cwRsync\bin or C:\cygwin\bin.

这样 rsync 和 ssh 命令应该可以从任何目录运行.确保您输入了正确的应用程序安装路径,否则它将无法工作.请参阅下面的屏幕截图:

This way the commands rsync and ssh should run from any directory. Make sure you put in the correct install path to the application else it won't work. See screenshot below:

环境变量设置:确保您添加的路径在系统变量下:

Environment Variable Setup: Make sure the path you added is under System Variables:

命令:如所见,我直接从 C: 驱动器的根目录运行它

Command: As seen, I am running this directly from root of C: drive

这篇关于无法识别 Windows 中的 cwrsync的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆