FTP 是一種文件傳輸協議。用於將文件從一臺服務器轉移到另外一臺服務器,FTP是使用一個客戶端和服務端進行連接。默認端口 21;html
# ftp domain.com # ftp IP-Address-of-server # ftp Host-name-of-server
root@server [~]# ftp domain.com Connected to domain.com (111.222.333.111). 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 220-You are user number 2 of 50 allowed. 220-Local time is now 08:41. Server port: 21. 220-This is a private system - No anonymous login 220-IPv6 connections are also welcome on this server. 220 You will be disconnected after 15 minutes of inactivity. Name (domain.com:root): USERNAME Password : PASSWORD 230 OK. Current restricted directory is / Remote system type is UNIX. Using binary mode to transfer files.
ftp > ls
ftp> cd dirName
ftp> lcd dirName
ftp> lcd Local directory now /root ftp> lcd /home/ Local directory now /home ftp> lcd Local directory now /home
ftp> get .ftpquota local: .ftpquota remote: .ftpquota 227 Entering Passive Mode (198,15,127,170,33,202) 150 Accepted data connection 226-File successfully transferred 226 0.014 seconds (measured here), 0.97 Kbytes per second 14 bytes received in 0.0122 secs (1.15 Kbytes/sec)
ftp> mget file1 file2
是否驗證每一步命令linux
ftp> prompt on Interactive mode off. ftp> prompt off Interactive mode on.
ftp> delete fileName
ftp> put fileName
ftp> mput file1 file2
ftp> mkdir dirName
ftp> rmdir dirName
ftp> ascii ftp> binary
ftp> quit Or ftp> bye
ftp> ? ftp> help ftp> help commandName英語原文:[weblink url="http://crybit.com/10-frequently-using-ftp-commands-with-example-unixlinux/"]frequently using ftp commands with example Unix/Linux[/weblink]