문제

I am using an FTP server which, while listing the files using e.g. ls command, returns the last modification date in following format:

05/06/12

Is there a way to know what date format the remote server is using?

도움이 되었습니까?

해결책

There is no definition about date format in the listings, it is not even defined that the listings should include the date at all. So you can only guess if you need to parse the listing. For a reliable and defined way to get the modification time of a file use the MDTM command. Unfortunately you need to send this for each file which could make everything slower.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top