`
sillycat
  • 浏览: 2551866 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Linux Commands(I) scp

阅读更多
Linux Commands(I) scp

1. scp is Secure Copy.

Copy the file from a remote host to the local host
>scp luohua@remote.server.com:/home/luohua/server.txt /home/luohua/tmp/server.txt

Copy the directory "client" from the local host to a remote host's directory "server"
>scp -r client luohua@remote.server.com:/home/luohua/server

Some other examples
Copy the file "foobar.txt" from remote host "rh1.edu" to remote host "rh2.edu"
>scp your_username@rh1.edu:/some/remote/directory/foobar.txt your_username@rh2.edu:/some/remote/directory/

Copying the files "foo.txt" and "bar.txt" from the local host to your home directory on the remote host
>scp foo.txt bar.txt your_username@remotehost.edu:~

Copy multiple files from the remote host to your current directory on the local host
>scp your_username@remotehost.edu:/some/remote/directory/\{a,b,c\} .
>scp your_username@remotehost.edu:~/\{foo.txt,bar.txt\} .

2. Test to run them in shell script
>vi data_import.sh
#!/bin/sh

echo "step1 start.................."
scp luohua@remote.server.com:~/server.txt ./t1.txt
echo "step1 end...................."

echo "step2 start.................."
wget http://www.baidu.com
echo "step2 end...................."

references:
http://www.hypexr.org/linux_scp_help.php
http://www.computerhope.com/unix/wget.htm





分享到:
评论

相关推荐

    Linux_Commands and_Shell_Programming_2nd

    书名为《Linux Commands and Shell Programming 2nd》,即第二版《Linux命令及Shell编程实用指南》,作者为Mark G. Sobell。这本书被描述为Linux命令行操作和Shell编程的必备读物,其内容通俗易懂,翔实可靠,专注于...

    A Practical Guide to Linux Commands, Editors, and Shell Programming 4th, ed

    Practical Guide to Linux Commands, Editors, and Shell Programming, A, 4th Edition By Mark G. Sobell, Matthew Helmke Published Nov 9, 2017 by Addison-Wesley Professional. The Most Useful Tutorial and...

    Operating System Concepts and Basic Linux Commands 无水印pdf

    Operating System Concepts and Basic Linux Commands 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,...

    The Linux Commands Handbook

    The Linux Commands Handbook follows the 80/20 rule: learn in 20% of the time the 80% of a topic. The author find this approach gives a well-rounded overview. This book does not try to cover ...

    linux下自动登录ssh/scp函数

    linux下使用expect自动登录ssh/scp函数,参考使用,供学习交流

    linux commands

    例如,`ls /home | cpio -o > /root`将`/home`目录中的文件复制到`/root`目录,而`cpio -i 则从`/root`目录提取所有文件,并创建一个名为`bk.indx`的索引文件。 以上只是Linux命令中的冰山一角,掌握这些基本命令将...

    A_Practical_Guide_To_Linux_Commands_Editors

    PRENTICE_HALL-A_Practical_Guide_To_Linux_Commands_Editors_And_Shell_Programming

    Linux Commands, Editors and Shell Programming

    本书《Linux Commands, Editors and Shell Programming》由Mark G. Sobell撰写,是关于Linux命令行、文本编辑器使用以及Shell脚本编程的实用指南。该书的第二版为读者提供了深入理解和应用Linux操作系统中常用命令、...

    A Practical Guide to Linux Commands, Editors, and Shell Programming, 第二版 pdf 英文版

    综上所述,《A Practical Guide to Linux Commands, Editors, and Shell Programming, 第二版》是一本非常适合初学者和有一定经验的Linux用户的综合指南。它不仅提供了丰富的基础知识,还深入探讨了许多高级主题,...

    linux-commands-cheat-sheet-A4.pdf

    Linux command cheat sheet linux系统常用命令行合集,包含系统命令,文件命令,硬件查看命令,用户查看命令,进程查看命令,文件权限命令,基本编译命令,搜索命令,登录命令,网络诊断命令,文件传输命令,磁盘...

    Practical Guide to Linux Commands, Editors and Shell Programming (2013)

    Practical Guide to Linux Commands, Editors and Shell Programming (2013) “This book is a very useful tool for anyone who wants to ‘look under the hood’ so to speak, and really start putting the ...

    linux ip related commands

    linux ip related commands linux ip related commands linux ip related commands linux ip related commands linux ip related commands linux ip related commands

    A Practical Guide to Linux Commands, Editors, and Programming(4th) 无水印原版pdf

    A Practical Guide to Linux Commands, Editors, and Shell Programming(4th) 英文无水印原版pdf 第4版 pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,...

    77-linux-commands Commands and Utilities.pdf

    77_linux_commands Commands and Utilities

    Linux Commands Line v1.1

    在IT领域,尤其是在操作系统管理与开发环境中,掌握Linux命令行是至关重要的技能。根据所提供的文件信息,我们将深入探讨其中提及的Linux命令行知识点,这些知识不仅对于初学者来说是宝贵的资源,也是高级用户进行...

    Introduction to Linux Commands

    在Linux操作系统中,命令行是用户与系统交互的主要方式。本文将详细介绍一些基础且重要的Linux命令,包括帮助命令、文件管理、系统/进程管理、任务管理和文本处理等。这些命令对于日常的系统操作和管理至关重要。 ...

    A Practical Guide to Linux Commands-Editors-Shell Programming.4th

    《Linux Commands, Editors, and Shell Programming. 4th》是一本专注于Linux命令、文本编辑器以及Shell编程的实用指南。本书深入浅出地介绍了大量的Linux命令和工具,它们是Linux系统管理、网络管理以及日常使用中...

    Basic Commands in LINUX

    Linux是一种流行的开源操作系统,它基于UNIX操作系统,具有多用户、多任务和强大的网络功能。Linux系统中有很多基础的命令,这些命令是进行系统管理、文件操作、权限控制以及压缩解压等工作的基本工具。本文主要介绍...

Global site tag (gtag.js) - Google Analytics