在 Linux (CentOS 7) 上使用 ftp 客户端时,使用命令时修改时间未按预期格式化ls
。列出文件时的修改时间与文件上传时的修改时间不同。
使用Filezilla,修改时间和上传时间是相同的。
有没有办法让 ftp 客户端在列出文件时使用系统时间?
在 CentOS 7 中使用 FTP 命令的日期/时间:
[support@cms-t09 ~] ftp 192.168.0.250
Connected to 192.168.0.250 (192.168.0.250).
220 ProFTPD Server (NETGEAR ReadyNAS) [SUPPORT_NAS]
Name (192.168.0.250:support): support
331 Password required for support
Password:
230 User supportlogged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd test
250 CWD command successful
ftp> ls
227 Entering Passive Mode (192,168,0,250,146,80).
150 Opening ASCII mode data connection for file list
226 Transfer complete
ftp> put test.txt
local: test.txt remote: test.txt
227 Entering Passive Mode (192,168,0,250,152,211).
150 Opening BINARY mode data connection for test.txt
226 Transfer complete
5 bytes sent in 3.6e-05 secs (138.89 Kbytes/sec)
ftp> ls
227 Entering Passive Mode (192,168,0,250,174,233).
150 Opening ASCII mode data connection for file list
-rw-rw-rw- 1 support users 5 Jul 30 22:43 test.txt
226 Transfer complete
上传后几分钟服务器上的日期/时间
[support@cms-t09 ~]$ date
Mon Jul 31 08:45:53 AEST 2023