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.