zoukankan      html  css  js  c++  java
  • 在linux下使用ftp命令

          1. 连接ftp服务器 
      格式:ftp [hostname| ip-address] 

      a)在linux命令行下输入:ftp 10.18.34.115 

      b)服务器询问你用户名和口令,分别输入yint和相应密码,待认证通过即可。 

      2. 下载文件 

      下载文件通常用get和mget这两条命令。 

      a) get 

      格式:get [remote-file] [local-file] 

      将文件从远端主机中传送至本地主机中. 

      如要获取服务器上E:\rose\1.bmp,则 

      ftp> get /rose/1.bmp 1.bmp (回车) 

      b) mget       
      格式:mget [remote-files] 

      从远端主机接收一批文件至本地主机. 

      如要获取服务器上E:\rose\下的所有文件,则 

      ftp> cd /rose 

      ftp> mget *.* (回车) 

      注意:文件都下载到了linux主机的当前目录下。比如,在 /root/yint下运行的ftp命令,则文件都下载到了/root/yint下。 

      3.上传文件 

      a) put 

      格式:put local-file [remote-file] 

      将本地一个文件传送至远端主机中. 

      如要把本地的1.bmp传送到远端主机E:\rose,并改名为333.bmp 

      ftp> put 1.bmp /rose/333.bmp (回车) 

      b) mput 

      格式:mput local-files 

      将本地主机中一批文件传送至远端主机. 

      如要把本地当前目录下所有bmp文件上传到服务器E:\rose 下 

      ftp> cd /rose (回车) 

      ftp> mput *.bmp (回车) 

      注意:上传文件都来自于主机的当前目录下。比如,在 /root/yint下运行的ftp命令,则只有在/root/yint下的文件linux才会上传到服务器E:\rose 下。

      4. 断开连接 

      bye:中断与服务器的连接。 

      ftp> bye (回车)

         

         转载自:http://forum.ubuntu.org.cn/viewtopic.php?t=104785

  • 相关阅读:
    LeetCode 326. Power of Three
    LeetCode 324. Wiggle Sort II
    LeetCode 322. Coin Change
    LeetCode 321. Create Maximum Number
    LeetCode 319. Bulb Switcher
    LeetCode 318. Maximum Product of Word Lengths
    LeetCode 310. Minimum Height Trees (DFS)
    个人站点大开发!--起始篇
    LeetCode 313. Super Ugly Number
    LeetCode 309. Best Time to Buy and Sell Stock with Cooldown (DP)
  • 原文地址:https://www.cnblogs.com/xiaofengkang/p/2422355.html
Copyright © 2011-2022 走看看