I'm interested in listing remote files (with names matching a pattern) by date, and storing this list locally. The various things I've tried follow:
ls -t SL*.txt
...is interpreted as a request to output to a local file named
ls SL*.txt local_out.txt
...behaves correctly but without the desired sorting behavior.
ls -t SL*.txt local_out.txt
...results in an error:
usage: ls remote-directory local-file
How can I get a time-sorted remote directory list, filtered for only matching content, saved to a file?