简体   繁体   English

将本地文件复制到ubuntu终端中的远程服务器

[英]copy local file to remote server in ubuntu terminal

I have to copy a file named thefilethefilethefile.txt from my local machine to the root of my remote server (I have to do this to prove I own the server). 我必须将一个名为thefilethefilethefile.txt的文件从本地计算机复制到远程服务器的根目录(我必须这样做以证明自己拥有该服务器)。

Jeez, where's Windows drag and drop when you need it. 哎呀,您需要时Windows可以在哪里拖放。 How can I achieve this simple task? 我怎样才能完成这个简单的任务?

In Ubuntu Terminal I have the prompt: 在Ubuntu终端中,出现提示:

metheuser@metheuser-HP-Pavilion-g6:~$ 

I make it: 我做到了:

metheuser@metheuser-HP-Pavilion-g6:~$ cp thefilethefilethefile.txt  theserver@theserver.com

hit ENTER and all I get is the prompt again : metheuser@metheuser-HP-Pavilion-g6:~$ 按ENTER键,我再次得到的提示是: metheuser@metheuser-HP-Pavilion-g6:~$

Then I log into theserver@theserver.com and the file isn't in the root directory. 然后,我登录theserver@theserver.com ,该文件不在根目录中。

I also tried : 我也尝试过:

scp thefilethefilethefile.txt theserver@theserver.com

to no avail. 无济于事。 Any help would be appreciated. 任何帮助,将不胜感激。

You need to use a : at the end of the hostname in scp 您需要在scp中主机名的末尾使用:

It works that way, as in : 它的工作方式如下:

scp thefilethefilethefile.txt theserver@theserver.com: scp thefilethefilethefile.txt theserver@theserver.com:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用 Windows 子系统将本地文件 wsl ubuntu 终端传输到远程服务器 - Unable to transfer local file wsl ubuntu terminal to remote server using windows subsystem 如何使用 Ubuntu 将本地图像文件从我的计算机复制到远程服务器? - How can I copy a local image file from my computer to a remote server using Ubuntu? 尝试将文件从本地 Mac 上传到远程 Ubuntu 服务器 - Trying to upload a file from local Mac to remote Ubuntu server 如何使用 Mac 终端通过 SSH 连接到本地 Ubuntu 服务器? - How to SSH into a local Ubuntu Server with Mac terminal? 使用 ssh 将文件从远程复制到本地 - Copy file from remote to local using ssh 如何将保护文件复制到 ubuntu 上的另一个目录(在终端中) - How can I copy protection file to another directory on ubuntu (in terminal) 如何读取位于Ubuntu终端上的本地json文件的属性值 - How to read a property value of json file located local on Ubuntu Terminal PHP:将文件上传到本地ubuntu服务器 - PHP: Upload a file to a local ubuntu server Ubuntu:如何将文本从在 ssh 上运行 vim 的终端复制到本地剪贴板 - Ubuntu: How to copy text from terminal which is running vim on ssh, into local clipboard 我该如何计划一个脚本,使用CRON和SCP每小时使用时间戳将文件从远程服务器复制到本地计算机? - How can I schedule a script to copy a file from a remote server to my local machine every hour with a time stamp using CRON & SCP?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM