Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top