← 返回命令列表

Linux command

ftp 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Connect to server

ftp [ftp.example.com]

Connect with username

ftp [username]@[ftp.example.com]

Non-interactive mode

ftp -n [ftp.example.com]

Download file

ftp> get [remote_file] [local_file]

Upload file

ftp> put [local_file] [remote_file]

说明

ftp is the standard File Transfer Protocol client for transferring files between local and remote systems. It provides an interactive command interface for file operations. The client supports navigation, file listing, binary/ASCII transfer modes, and batch transfers. Passive mode helps with firewalls. The protocol transmits credentials in cleartext. ftp remains useful for accessing legacy systems and public FTP archives.

参数

-n
No auto-login.
-i
No interactive prompts for multiple transfers.
-v
Verbose mode.
-p
Passive mode.
get _FILE_
Download file.
put _FILE_
Upload file.
mget _FILES_
Download multiple files.
--help
Display help information.

FAQ

What is the ftp command used for?

ftp is the standard File Transfer Protocol client for transferring files between local and remote systems. It provides an interactive command interface for file operations. The client supports navigation, file listing, binary/ASCII transfer modes, and batch transfers. Passive mode helps with firewalls. The protocol transmits credentials in cleartext. ftp remains useful for accessing legacy systems and public FTP archives.

How do I run a basic ftp example?

Run `ftp [ftp.example.com]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -n do in ftp?

No auto-login.