I log into sftp:
sftp user@server
Then I run:
ls -lt
I expect files to be sorted by date.
sftp> ls -lt *.csv
-rw------- 0 76547986 200 5073032 Mar 14 08:42 file1.csv
-rw------- 0 76547986 200 5073032 Mar 15 08:41 file2.csv
-rw------- 0 76547986 200 5073032 Mar 16 08:41 file3.csv
-rw------- 0 76547986 200 5072802 Mar 17 08:42 file4.csv
-rw------- 0 76547986 200 1117736 Sep 30 14:44 file5.csv
-rw------- 0 76547986 200 1120419 Oct 2 08:45 file6.csv
-rw------- 0 76547986 200 1119763 Oct 1 08:43 file7.csv
-rw------- 0 76547986 200 5073258 Mar 13 08:41 file8.csv
But they are not.
Here is the version of OpenSSH
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
Any idea why date sorting for ls in sftp is not working?
NOTE: ls -lt works in bash on the sftp server just not through sftp prompt. Maybe a bug in sftp?