1. 程式人生 > >使用cmd連線操作ftp伺服器

使用cmd連線操作ftp伺服器

通過cmd命令列方式連線和操作ftp伺服器

1.cmd登入ftp伺服器

C:\Documents and Settings\Administrator>ftp
ftp> help
Commands may be abbreviated.  Commands are:

!               delete          literal         prompt          send
?               debug           ls              put             status
append          dir             mdelete         pwd             trace
ascii           disconnect      mdir            quit            type
bell            get
mget quote user binary glob mkdir recv verbose bye hash mls remotehelp cd help mput rename close lcd open rmdir ftp> open
192.168.1.100 Connected to 192.168.1.100. 220 (vsFTPd 2.2.2) User (192.168.1.100:(none)): admin 331 Please specify the password. Password: 230 Login successful. ftp> pwd 257 "/home/sweethome"

2.命令列操作

命令 說明 示例
ftp cmd命令列下輸入ftp進入到ftp命令列
open open ftp地址登入ftp伺服器,輸入ftp伺服器使用者名稱和密碼登入 open 192.168.1.100
ls ls顯示資料夾下所有檔案 ls
dir dir檢視ftp目錄下的檔案,許可權等相關資訊 dir
cd cd 檔案目錄進入某個資料夾下 cd /aa
lcd lcd檢視當前使用者路徑,即預設下載路徑;lcd 本地路徑下載檔案存放到本地的路徑 lcd
get 下載檔案到本地 get fileName
put 上傳檔案到ftp put filePath
delete 刪除ftp上的檔案 delete fileName
bye 退出連線 bye
quit 退出連線 quit