用PSCP在Windows和Linux之间相互传输文件
在Linux服务器之间相互传文件我们常用 scp命令,但是在Linux和Windows之间相互传输就不那么直接了。
使用 Putty的 PSCP 则会简单的多
1. 下载
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
2. 设置Windows机器的环境变量
下载的pscp是个简单的exe文件,设置下Path环境变量即可
使用说明如下,和SCP命令很像
E:\ClientDump\PROD_DB_20131119\DBBackUp2013115>pscp PuTTY Secure Copy client Development snapshot 2014-01-17:r10117 Usage: pscp [options] [user@]host:source target pscp [options] source [source...] [user@]host:target pscp [options] -ls [user@]host:filespec Options: -V print version information and exit -pgpfp print PGP key fingerprints and exit -p preserve file attributes -q quiet, don't show statistics -r copy directories recursively -v show verbose messages -load sessname Load settings from saved session -P port connect to specified port -l user connect with specified username -pw passw login with specified password -1 -2 force use of particular SSH protocol version -4 -6 force use of IPv4 or IPv6 -C enable compression -i key private key file for authentication -noagent disable use of Pageant -agent enable use of Pageant -batch disable all interactive prompts -unsafe allow server-side wildcards (DANGEROUS) -sftp force use of SFTP protocol -scp force use of SCP protocol
3. 上传到Linux
E:\ClientDump\PROD_DB_20131119\DBBackUp2013115>pscp RSKORGP1_RA_ARCH.dmp libi@AP C-LGROPFDB601:/u00/software/CIT/RSKORGP1_RA_ARCH.dmp libi@APC-LGROPFDB601's password: RSKORGP1_RA_ARCH.dmp | 6475872 kB | 11564.1 kB/s | ETA: 00:00:00 | 100%
4. 从Linux下载
E:\ClientDump\PROD_DB_20131119\DBBackUp2013115>pscp libi@APC-LGROPFDB601:/home/l ibi/.bash_profile bash_profile libi@APC-LGROPFDB601's password: bash_profile | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
5. 操作整个目录
添加 -r 参数即可传输整个目录,很方便
-r copy directories recursively
浙公网安备 33010602011771号