List files on FTP remote sorted by last added using cURL?

List files from oldest to newest using curl and ftp:

curl -u login:pass ftp://ip:port/path/to/file/ | sort -r

The command ls -ltc does not work since it sorts files alphabetically from A to Z. The above command should list the files in the FTP directory in an reverse chronological order.

To list files from oldest to newest using curl and ftp, you can use the following command:

curl -u login:pass ftp://ip:port/path/to/file/ | sort -r

This command will retrieve the file listing from the FTP server using curl and then sort the output in reverse chronological order using sort -r.