linux sftp使用样例

来源:互联网 发布:大数据的真实性 编辑:程序博客网 时间:2024/05/20 15:12

sftp的使用


从208服务器上取下oracle安装文件到centos3 服务器上。

[root@centos3 opt]# sftp oracle@192.168.100.208   ------连接到centos3服务器上,使用sftp命令登陆208指定登陆的用户
Connecting to 192.168.100.208...
The authenticity of host '192.168.100.208 (192.168.100.208)' can't be established.
RSA key fingerprint is b8:6f:91:fa:d1:c4:d6:96:e1:3f:7a:7f:15:55:c6:52.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.100.208' (RSA) to the list of known hosts.
oracle@192.168.100.208's password:                                             ------输入登陆用户的密码
sftp> lls  ---查看本地文件  
apache-maven-3.0.4             jdk1.6.0_23  nexus    wordpress-3.3.1-zh_CN.zip
apache-maven-3.0.4-bin.tar.gz  jenkins.war  package
apache-tomcat-6.0.29           maven-repo   tomcat
sftp> ls----查看208上的文件
Desktop                   db_oinstall.rsp           kill_sniped_session.sh    
on.lst                    oradiag_oracle            sniped_session.sql        
sftp> cd /opt ----进入208的/opt目录下
sftp> ls -----查看208opt目录下的文件情况
ORCLfmap                                apache-tomcat-6.0.29                    
apache-tomcat-6.0.29.tar.gz             app                                     
database                                linux.x64_11gR1_database_1013.zip       
linux.x64_11gR2_database_1of2.zip       linux.x64_11gR2_database_2of2.zip       
oracle11.1                              rpm                                     
sftp> lpwd  ----查看本地路径
Local working directory: /opt
                    
sftp> get linux.x64_11gR2_database_1of2.zip   ----将208上文件get到本地
Fetching /opt/linux.x64_11gR2_database_1of2.zip to linux.x64_11gR2_database_1of2.zip
/opt/linux.x64_11gR2_database_1of2.zip        100% 1182MB  40.8MB/s   00:29    
sftp> get linux.x64_11gR2_database_2of2.zip
Fetching /opt/linux.x64_11gR2_database_2of2.zip to linux.x64_11gR2_database_2of2.zip
/opt/linux.x64_11gR2_database_2of2.zip        100% 1060MB  42.4MB/s   00:25    
sftp> lls    -------查看本地文件
apache-maven-3.0.4                 linux.x64_11gR2_database_2of2.zip
apache-maven-3.0.4-bin.tar.gz      maven-repo
apache-tomcat-6.0.29               nexus
jdk1.6.0_23                        package
jenkins.war                        tomcat
linux.x64_11gR2_database_1of2.zip  wordpress-3.3.1-zh_CN.zip   
sftp> exit  ------ 退出

[root@centos3 opt]# ll     
总计 2356616
drwxrwxrwx  6 root root       4096 2012-02-22 apache-maven-3.0.4
-rw-r--r--  1 root root    4873043 2012-01-17 apache-maven-3.0.4-bin.tar.gz
drwxrwxrwx  9 root root       4096 2012-02-10 apache-tomcat-6.0.29
drwxrwxrwx 10 root root       4096 2012-02-09 jdk1.6.0_23
-rw-r--r--  1 root root   50485821 2012-04-09 jenkins.war
-rw-r--r--  1 root root 1239269270 10-16 09:26 linux.x64_11gR2_database_1of2.zip
-rw-r--r--  1 root root 1111416131 10-16 09:27 linux.x64_11gR2_database_2of2.zip

drwxrwxrwx 30 root root       4096 05-03 12:01 maven-repo
drwxrwxrwx  4 root root       4096 2012-02-09 nexus
drwxrwxrwx  2 root root       4096 2012-04-12 package
drwxrwxrwx  9 user user       4096 2012-04-12 tomcat
-rw-r--r--  1 root root    4657514 2012-03-02 wordpress-3.3.1-zh_CN.zip

原创粉丝点击