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

FTP 指令完整詳解:事半功倍的內部命令大全

編輯:網路工具

FTP 指令是網路用戶最高頻使用的指令之一,無論在 DOS 或 UNIX 環境,熟悉內部命令能大幅提升操作效率。

命令列格式

ftp -v -d -i -n -g [主機名]

  • -v:顯示遠端伺服器所有回應資訊
  • -n:限制自動登入(不使用 .netrc)
  • -i:關閉互動式多檔傳輸提示
  • -d:除錯模式
  • -g:取消全域檔名展開

常用內部命令([ ] 為可選參數)

命令說明
! [cmd [args]]在本機執行互動 shell,exit 返回 ftp 環境(如 !ls *.zip)
$ macro-name [args]執行巨集定義
account [password]提供登入成功後存取資源所需的補充密碼
append local-file [remote-file]將本機檔案附加到遠端主機,未指定遠端檔名則用本機檔名
ascii使用 ASCII 傳輸模式
bell每個命令執行完畢響鈴一次
bin / binary使用二進位傳輸模式
bye / quit結束 FTP 會話
casemget 時將遠端大寫檔名轉小寫
cd remote-dir進入遠端目錄
cdup進入遠端父目錄
chmod mode file-name設定遠端檔案存取模式(如 chmod 777 a.out)
close中斷與遠端伺服器的 FTP 會話
crASCII 傳輸時將換行轉換為回車
delete remote-file刪除遠端檔案
debug [debug-value]設定除錯模式,顯示發送至遠端的每條命令(0 為關閉)
dir [remote-dir] [local-file]顯示遠端目錄並存入本機檔案
disconnect同 close
form format設定檔案傳輸格式,預設 file
get remote-file [local-file]下載遠端檔案到本機

(更多命令請參考完整 FTP RFC 文件)

Copyright © Windows教程網 All Rights Reserved