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