[英]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.