天天看點

Linux基礎指令---put上傳ftp檔案

put

使用lftp登入ftp伺服器之後,可以使用put指令将檔案上傳到伺服器。
           

1、文法

put  [-E]  [-a]  [-c]  [-O base]  lfile  [-o rfile]
           

2、選項清單

-o
        指定輸出檔案的名字,不指定則使用原來的名字
  -c
        如果失敗,持續擷取
  -E
        擷取之後,删除源檔案
  -a
        使用ascii模式
  -O
        指定輸出檔案存放的目錄
           

3、執行個體

上傳檔案

[root@localhost weijie]# lftp 192.168.1.8          //登入伺服器
  lftp 192.168.1.8:~> cd pub/                           //切換目錄
  lftp 192.168.1.8:/pub> put 3.c                       //上傳檔案
  65 bytes transferred
  lftp 192.168.1.8:/pub> ls                             //檢視内容,已經上傳成功
  -rwxrwxrwx    1 0        0        2375494044 Aug 14 06:38 1.zip
  -rw-r--r--    1 0        0               0 Oct 02 01:19 11c
  -rw-r--r--    1 0        0               0 Oct 02 01:19 22c
  -rw-------    1 14       50             65 Oct 02 01:48 3.c
  drwxr-xr-x    2 0        0            4096 Oct 02 01:12 testftp
  lftp 192.168.1.8:/pub> 

  做了一個Linux學習的平台,目前出來一個雛形,各位可以參考使用
  連結:https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ  密碼:n7bk  
  ![081634m8n8t2tmz2te95w5](https://yqfile.alicdn.com/4178a434b793f18ff7e0f285f98634611e3f707c.gif)
           

繼續閱讀