【转】pscp实现远程文件(夹)传输

mac2022-06-30  89

原文地址: http://blog.163.com/yang_jianli/blog/static/16199000620128251383197/   pscp与linux下的scp命令相似,功能相同,在windows下使用,只有一个文件,建议将pscp.exe放到C:\WINDOWS\system32下,这样可以在任何地方调用了。 

 

一、用法:

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

    pscp  [option] source  [source…]   [user@]host

    pscp  [option] -ls  user@host:filespace

二、option

几个常用的option:

 -p    preserve file attrbutes 拷贝文件时保留源文件建立的时间

-q    quiet,don’t show satatistics 执行文件拷贝时,不显示任何提示消息

-r     copydirectories recursively 拷贝整个目录

-v     show verbose messages拷贝文件时,显示提示信息

-V     print version information and exit

 

其他option:

-loadsessname   Load settings from savedsession 加载保存session的设置

-P port          connect to specified port 连接到指定端口

-I user          connect with specified username 用指定的用户连接

-pw passw       connect with specified password用指定的密码登陆

-1/-2           指定ssh使用的版本

-4/-6           指定使用IPv4或IPv6

-C              打开压缩

 

三、常用的方法:

1、  把本地文件file传输到linux服务器的/root/

      C:\pscp.exe  file 192.168.101.70:/root/

   会提示输入密码,这里pscp使用在windows登陆的用户名,因此可能需要指定linux用户名:

      C:\pscp.exe file

      或者

      C:\pscp.exe –I root file 192.168.101.70:/root/.

      注意:这里-I root 要在file之前

2、  把本地目录dir、文件file传输到Linux服务器的/root/,并指定服务器端口2009

      C:\pscp.exe –P 2009 –r dir fileroot@192.168.101.70:/root/

3、  把服务器上的/root/file文件取回来本地当前目录

      C:\pscp.exeroot@192.168.101.70:/root/file

4、  把服务器上的/root/dir目录取回本地”C:\My Documents\data\”目录

        C:\pscp.exe –r “C:\MyDocuments\data\”

------------------------------------------------------------------------------------------------------------------ 下载地址: 1ftp://spezvuz.vl.net.ua/bbs/network/pscp.exe157.5 KB 2ftp://spezvuz.vl.net.ua/driver/bbs/network/pscp.exe157.5 KB 3ftp://spezvuz.vl.net.ua/bbs/network/pscp.exe.diz23 B 4ftp://spezvuz.vl.net.ua/driver/bbs/network/pscp.exe.diz23 B 5ftp://po.istu.ru/public/utils/putty/PSCP.EXE288 KB 6ftp://193.108.251.142/pub/oldrive/install/inet/putty/pscp.exe224 KB 7ftp://193.108.251.142/pub/oldrive/install/inet/putty/Old/pscp.exe224 KB 8ftp://193.108.251.142/pub/oldrive/install/inet/putty/ver 0-52/pscp.exe240 KB 9ftp://193.108.251.142/pub/oldrive/install/inet/putty/ver 0-54/pscp.exe248 KB 10ftp://yam.avtf.net/win_distr/PuTTY_0.53b/pscp.exe240 KB 11ftp://109.123.171.14/study/Zamyatin/public/putty 0.57/pscp.exe256 KB 12ftp://109.123.171.14/distr/Shells/Far/Plugins/Putty/pscp.exe240 KB 13ftp://194.220.19.160/pub/Soft/_System/putty.org.ru/PSCP.exe534.5 KB 14ftp://194.220.19.160/pub/Soft/_System/putty.org.ru/Addons/original/pscp.exe304 KB

转载于:https://www.cnblogs.com/peapon/p/7052472.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)