使用 PUTTY 将文件从 Windows 复制到 UNIX [英] copy file from Windows to UNIX using PUTTY

查看:43
本文介绍了使用 PUTTY 将文件从 Windows 复制到 UNIX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将文件从 Windows 复制到 UNIX 到特定文件夹并设置文件组(chgrp 或其他).问题是我在 unix 中有超过 16 个组.

I need to copy a file from windows to UNIX to a specific folder and set the file group (chgrp or something). The problem is that i have more than 16 groups in unix.

有没有办法不用编写和启动 UNIX 脚本就可以做到这一点?

Is there a way to do it without writing and launching a UNIX script?

推荐答案

它应该可以使用 PSCP.说明:

It should work using PSCP. Instructions:

  1. 从 Putty 下载页面下载 PSCP.EXE
  2. 打开命令提示符并输入 set PATH=
  3. 在命令提示符中使用 cd 命令指向 pscp.exe 的位置
  4. 输入pscp
  5. 使用以下命令将文件从远程服务器复制到本地系统

  1. Download PSCP.EXE from Putty download page
  2. Open command prompt and type set PATH=<path to the pscp.exe file>
  3. In command prompt point to the location of the pscp.exe using cd command
  4. Type pscp
  5. use the following command to copy file form remote server to the local system

pscp [options] [user@]host:source target

所以要将文件 /etc/hosts 从服务器 example.com 作为用户 fred 复制到文件 c:\temp\example-hosts.txt,你会输入:

So to copy the file /etc/hosts from the server example.com as user fred to the file c:\temp\example-hosts.txt, you would type:

pscp fred@example.com:/etc/hosts c:\temp\example-hosts.txt

来源

这篇关于使用 PUTTY 将文件从 Windows 复制到 UNIX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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