龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 操作系统 > LINUX系统 >

linux命令大全之scp命令详解(复制文件和目录)(2)

时间:2014-05-19 03:38来源:网络整理 作者:网络 点击:
分享到:
实例2:从远处复制到本地 命令:scp -r root@192.168.120.204:/opt/soft/mongodb /opt/soft/ 输出: 代码如下: [root@localhost soft]# ll 总计 80556 drwxr-xr-x 12 root root 4096 09-21 1

实例2:从远处复制到本地
命令:scp -r root@192.168.120.204:/opt/soft/mongodb /opt/soft/
输出:

代码如下:

[root@localhost soft]# ll
总计 80556
drwxr-xr-x 12 root root 4096 09-21 18:40 fms3.5
drwxr-xr-x 3 root root 4096 09-21 17:58 fms4.5
drwxr-xr-x 10 root root 4096 10-30 17:15 jdk1.6.0_16
drwxr-xr-x 10 root root 4096 09-17 19:27 jdk1.6.0_16.bak
-rwxr-xr-x 1 root root 81871260 2009-12-21 jdk-6u16-linux-x64.bin
drwxrwxrwx 2 root root 4096 09-21 01:16 mysql
-rw-r--r-- 1 root root 490220 03-15 09:11 nginx-0.5.38.tar.gz
drwxr-xr-x 3 root root 4096 09-21 18:40 setup_file
drwxr-xr-x 9 root root 4096 09-17 19:23 tomcat6.0.32
drwxr-xr-x 9 root root 4096 2012-08-14 tomcat_7.0
[root@localhost soft]# scp -r <a href="mailto:root@192.168.120.204:/opt/soft/mongodb">root@192.168.120.204:/opt/soft/mongodb</a> /opt/soft/
<a href="mailto:root@192.168.120.204's">root@192.168.120.204's</a> password:
mongodb-linux-i686-static-1.8.5.tgz 100% 28MB 28.3MB/s 00:01
README 100% 731 0.7KB/s 00:00
THIRD-PARTY-NOTICES 100% 7866 7.7KB/s 00:00
mongorestore 100% 7753KB 7.6MB/s 00:00
mongod 100% 7760KB 7.6MB/s 00:01
mongoexport 100% 7744KB 7.6MB/s 00:00
bsondump 100% 7737KB 7.6MB/s 00:00
mongofiles 100% 7748KB 7.6MB/s 00:01
mongostat 100% 7808KB 7.6MB/s 00:00
mongos 100% 5262KB 5.1MB/s 00:01
mongo 100% 3707KB 3.6MB/s 00:00
mongoimport 100% 7754KB 7.6MB/s 00:00
mongodump 100% 7773KB 7.6MB/s 00:00
GNU-AGPL-3.0 100% 34KB 33.7KB/s 00:00
[root@localhost soft]# ll
总计 80560
drwxr-xr-x 12 root root 4096 09-21 18:40 fms3.5
drwxr-xr-x 3 root root 4096 09-21 17:58 fms4.5
drwxr-xr-x 10 root root 4096 10-30 17:15 jdk1.6.0_16
drwxr-xr-x 10 root root 4096 09-17 19:27 jdk1.6.0_16.bak
-rwxr-xr-x 1 root root 81871260 2009-12-21 jdk-6u16-linux-x64.bin
drwxr-xr-x 3 root root 4096 03-15 09:18 mongodb
drwxrwxrwx 2 root root 4096 09-21 01:16 mysql
-rw-r--r-- 1 root root 490220 03-15 09:11 nginx-0.5.38.tar.gz
drwxr-xr-x 3 root root 4096 09-21 18:40 setup_file
drwxr-xr-x 9 root root 4096 09-17 19:23 tomcat6.0.32
drwxr-xr-x 9 root root 4096 2012-08-14 tomcat_7.0
[root@localhost soft]#

说明:从192.168.120.204机器上的/opt/soft/中下载mongodb 目录到本地的/opt/soft/目录来。

精彩图集

赞助商链接