Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux FTP 指令完整速查:連線、上傳下載、批次傳輸與斷線

編輯:Linux 教學

純文字模式下透過 ftp 指令進行檔案傳輸,適用於無圖形介面的伺服器環境。

一、連線與登入

ftp 192.168.1.1
# 輸入帳號密碼完成認證

二、下載檔案

指令用途範例
get下載單一檔案get /remote/path/file.txt local.txt
mget下載多檔(萬用字元)cd /remote/path && mget *.*

關閉逐檔確認提示:prompt off 再執行 mget。

預設下載至本機目前工作目錄。

三、上傳檔案

指令用途範例
put上傳單一檔案put local.txt /remote/path/remote.txt
mput上傳多檔cd /remote/path && mput *.html

上傳來源為本機目前工作目錄。

四、斷線

bye

五、實用技巧

  • 搭配 lftp 或 ncftp 可支援書籤、續傳、鏡像同步等進階功能。
  • 自動化腳本可用 ftp -n < script.txt 批次執行。
  • 安全性要求高請改用 sftp 或 scp(SSH 加密傳輸)。

熟記基本指令,即可在任何 Linux 主機快速完成檔案傳輸。

Copyright © Windows教程網 All Rights Reserved