[译]什么是FTP MLSD命令

What is MLSD FTP command
什么是FTP MLSD命令

(注:原文有改动)

[Traceback: http://www.ftprush.com/ftp-mlsd.html]

 

Older servers supports LIST command only for directory listing, this way the FTP client gets a non-userfriendly raw format for parsing, and only FTP clients knows what it meaning. Since the file timestamp based on the server timezone, it makes more different to doing FTP synchronize with folders and files because of there is no way to get current file timestamp in the server.
旧的服务对目录列表仅支持LIST命令,这样FTP客户端会获得一个非用户友好的待解析的原始格式,仅仅只有FTP客户端知道它的意义。由于文件的时间戳基于服务器的时区,它使得在FTP对目录和文件同步时有许多的不同,因为没有方法获得服务器上当前文件的时间戳。

For example there is a normally LIST format of raw directory:
-rw-r--r-- 1 user user 7080 Mar 9 05:24 faq.html
例如:这是对原始目录的普通LIST命令格式
-rw-r--r-- 1 user user 7080 Mar 9 05:24 faq.html

Is it readable for you?
是否可读呢?

The MLSD command provided by newer servers to gives users a standarded, detailed, readable directory listing, by sending MLSD command through FTP clients, the server returns accurate file information such as file create time, modified time, size and file owner. Since MLSD directory listing includes file modified time in UTC, so it's very useful for FTP client to converts remote file's timestamp to your Local time when synchronize folders. Also the MLST command could be used to get timestamp of single remote file only.
新的服务器提供的MLSD命令通过FTP客户端发送MLSD命令,服务器收集文件信息,如文件创建时间,修改时间,文件大小及文件所有用,向用户返回一个标准,详细且可读格式的目录列表。由于MLSD目录列表包含UTC格式的文件修改时间,因此这对于FTP客户端非常有用,当需要同步目录时,它可转换远程文件的时间戳到你的本地时间。同时,MLST命令也被用于获得单个远程文件的时间戳。

 

[更多参考]

Extensions to FTP(FTP扩展):RFC 3659

posted @ 2009-12-08 10:03  Donot Forget  阅读(18337)  评论(0编辑  收藏  举报