使用 PUTTY 将文件从 Windows 复制到 UNIX [英] copy file from Windows to UNIX using PUTTY
问题描述
我需要将文件从 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:
- 从 Putty 下载页面下载 PSCP.EXE
- 打开命令提示符并输入
set PATH=
- 在命令提示符中使用
cd
命令指向pscp.exe
的位置 - 输入
pscp
使用以下命令将文件从远程服务器复制到本地系统
- Download PSCP.EXE from Putty download page
- Open command prompt and type
set PATH=<path to the pscp.exe file>
- In command prompt point to the location of the
pscp.exe
usingcd
command - Type
pscp
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屋!