linux ftp显示当前端口命令
时间: 2023-07-10 12:32:49 浏览: 326
在Linux中,您可以使用“status”命令来显示当前FTP客户端的端口号。在FTP会话中,输入“status”命令,然后按Enter键。这将显示当前FTP客户端的连接状态,包括本地IP地址、远程IP地址和端口号。在“status”命令的输出中,您可以查找“Local”行来查看FTP客户端的端口号。例如:
```
ftp> status
Connected to ftp.example.com.
220 Welcome to the FTP server.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> status
Connected to ftp.example.com.
220 Welcome to the FTP server.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> status
Connected to ftp.example.com.
220 Welcome to the FTP server.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> status
Connected to ftp.example.com.
220 Welcome to the FTP server.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> status
Connected to ftp.example.com.
220 Welcome to the FTP server.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> status
Connected to ftp.example.com.
No proxy connection.
Mode: stream; Type: binary; Form: non-print; Structure: file
Verbose: on; Bell: off; Prompting: on; Globbing: on
Store unique: off; Receive unique: off
Case: off; CR: off; LF: on
Local echo: on; Quote echo: on
Local: 192.168.0.100, 21
Remote: 203.0.113.1, 1025
ftp>
```
在上面的示例中,“Local”行显示本地IP地址和端口号(192.168.0.100和21),而“Remote”行显示远程IP地址和端口号(203.0.113.1和1025)。
阅读全文