mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-10 00:00:29 +08:00
parent
065a638b75
commit
43dfe1cda8
@ -3,16 +3,18 @@
|
|||||||
[#]: author: "Paul https://opensource.com/users/plaubscher"
|
[#]: author: "Paul https://opensource.com/users/plaubscher"
|
||||||
[#]: collector: "lkxed"
|
[#]: collector: "lkxed"
|
||||||
[#]: translator: "geekpi"
|
[#]: translator: "geekpi"
|
||||||
[#]: reviewer: " "
|
[#]: reviewer: "wxy"
|
||||||
[#]: publisher: " "
|
[#]: publisher: "wxy"
|
||||||
[#]: url: " "
|
[#]: url: "https://linux.cn/article-15234-1.html"
|
||||||
|
|
||||||
使用 PSCP 将文件和文件夹从 Windows 传输到 Linux
|
使用 PSCP 将文件和文件夹从 Windows 传输到 Linux
|
||||||
======
|
======
|
||||||
|
|
||||||
开源 PSCP 程序可以轻松地在 Windows 和 Linux 计算机之间传输文件和文件夹。
|
![](https://img.linux.net.cn/data/attachment/album/202211/10/074452ys2lgjdqq8gaj8rg.jpg)
|
||||||
|
|
||||||
你是否正在寻找一种将文件从 Windows 计算机快速传输到 Linux 计算机并再次传输回来的方法?开源 PSCP 程序可以轻松传输文件和文件夹,当然它是开源的。
|
> 开源的 PSCP 程序可以轻松地在 Windows 和 Linux 计算机之间传输文件和文件夹。
|
||||||
|
|
||||||
|
你是否正在寻找一种将文件从 Windows 计算机快速传输到 Linux 计算机并再次传输回来的方法?开源的 PSCP 程序可以轻松传输文件和文件夹,当然它是开源的。
|
||||||
|
|
||||||
### 在 Windows 中设置 PATH
|
### 在 Windows 中设置 PATH
|
||||||
|
|
||||||
@ -23,9 +25,9 @@
|
|||||||
PSCP(PuTTY 安全复制协议)是一个命令行工具,用于将文件和文件夹从 Windows 计算机传输到 Linux 计算机。
|
PSCP(PuTTY 安全复制协议)是一个命令行工具,用于将文件和文件夹从 Windows 计算机传输到 Linux 计算机。
|
||||||
|
|
||||||
- 从 [网站][2] 下载 `pscp.exe`。
|
- 从 [网站][2] 下载 `pscp.exe`。
|
||||||
- 将 `pscp.exe` 移动到 PATH 中的文件夹(例如,如果你按照 [Opensource.com][3] 上的 PATH 教程进行操作,则为 `Desktop\App`)。如果你没有设置 PATH 变量,你也可以将 `pscp.exe` 移动到保存要传输的文件的文件夹中。
|
- 将 `pscp.exe` 移动到 `PATH` 中的文件夹(例如,如果你按照 [Opensource.com][3] 上的 PATH 教程进行操作,则为 `Desktop\App`)。如果你没有设置 `PATH` 变量,你也可以将 `pscp.exe` 移动到保存要传输的文件的文件夹中。
|
||||||
- 使用 Windows 任务栏中的搜索栏在 Windows 计算机上打开 Powershell(在搜索栏中输入 `powershell`。)
|
- 使用 Windows 任务栏中的搜索栏在 Windows 计算机上打开 Powershell(在搜索栏中输入 `powershell`。)
|
||||||
- 输入 `pscp –version` 以确认你的计算机可以找到该命令。
|
- 输入 `pscp -version` 以确认你的计算机可以找到该命令。
|
||||||
|
|
||||||
### IP 地址
|
### IP 地址
|
||||||
|
|
||||||
@ -61,16 +63,19 @@ inet 192.168.1.23/24 brd 10.0.1.255 scope global noprefixroute eth0
|
|||||||
|
|
||||||
### 传输文件
|
### 传输文件
|
||||||
|
|
||||||
在这个例子中,我有一个名为 `pscp-test.txt` 的文件,我想将它从我的 Windows 计算机上的 `C:\Users\paul\Documents` 传输到我的目标 Linux 计算机主目录 `/_home_/paul`。
|
在这个例子中,我有一个名为 `pscp-test.txt` 的文件,我想将它从我的 Windows 计算机上的 `C:\Users\paul\Documents` 传输到我的目标 Linux 计算机主目录 `/home/paul`。
|
||||||
|
|
||||||
现在你已经有了 `pscp` 命令和目标地址,你可以传输测试文件 `pscp-test.txt`。打开 Powershell 并使用 `dir` 命令切换到示例文件所在的 `Documents` 文件夹:
|
现在你已经有了 `pscp` 命令和目标地址,你可以传输测试文件 `pscp-test.txt`。打开 Powershell 并使用 `dir` 命令切换到示例文件所在的 `Documents` 文件夹:
|
||||||
|
|
||||||
|
```
|
||||||
PS> dir %USERPROFILE%\Documents\
|
PS> dir %USERPROFILE%\Documents\
|
||||||
|
```
|
||||||
|
|
||||||
现在执行传输:
|
现在执行传输:
|
||||||
|
|
||||||
```
|
```
|
||||||
PS> pscp pscp-test.txt paul@192.168.1.23:/home/paul| Password:
|
PS> pscp pscp-test.txt paul@192.168.1.23:/home/paul
|
||||||
|
| Password:
|
||||||
End of keyboard-interactive prompts from server
|
End of keyboard-interactive prompts from server
|
||||||
pscp-test.txt | 0 kb | 0.0 kB/s | ETA: 00:00:00 | 100%
|
pscp-test.txt | 0 kb | 0.0 kB/s | ETA: 00:00:00 | 100%
|
||||||
```
|
```
|
||||||
@ -85,7 +90,7 @@ pscp-test.txt |0 kb |0.0 kB/s | ETA: 00:00:00 |100%
|
|||||||
|
|
||||||
### 验证已传输
|
### 验证已传输
|
||||||
|
|
||||||
在你的 Linux 计算机上,打开终端并使用 `ls` 命令验证文件 `pscp-test.txt` 是否出现在您的主目录中。
|
在你的 Linux 计算机上,打开终端并使用 `ls` 命令验证文件 `pscp-test.txt` 是否出现在你的主目录中。
|
||||||
|
|
||||||
```
|
```
|
||||||
[linux]$ ls
|
[linux]$ ls
|
||||||
@ -125,7 +130,7 @@ via: https://opensource.com/article/22/10/transfer-files-windows-linux-pscp
|
|||||||
作者:[Paul][a]
|
作者:[Paul][a]
|
||||||
选题:[lkxed][b]
|
选题:[lkxed][b]
|
||||||
译者:[geekpi](https://github.com/geekpi)
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
Loading…
Reference in New Issue
Block a user