首先将pscp.exe放在system32下,在windows命令行执行下面语句:

1、将windows下的文件上传到linux

pscp E:\hadoop\test.txt hadoop@182.20.45.122:/home/hadoop/

2、将linux文件下载到本地windows

pscp hadoop@182.20.45.122:/home/hadoop/test.txt E:\hadoop

3、将Linux的整个文件夹拷贝到本地windows

pscp -r hadoop@182.20.45.122:/home/hadoop/test E:\hadoop

注意:如果出现

---"more than one remote source not supported"错误提示

一般都是由于路径的文件夹名字有空格等非法字符,换一个路径或者把文件名字的空格等非法字符去掉,路径名是支持中文的

4、将windows下的文件夹上传到linux

pscp -r E:\hadoop\test hadoop@182.20.45.122:/home/hadoop/


Logo

更多推荐