Hello, I apologize if this is not the appropriate mailing list for this question. Is there a reason why the "sftp" client included with OpenSSH does not present an alphabetical listing of files when you do "ls"? I use the OpenSSH 3.0.2p1 "sftp" client on Linux, Solaris, AIX, and Digital UNIX. Is this the expected behavior and is there any way to make it do alphabetical directory listings or do I need to delve into the code and add this functionality myself? Thanks! -- Jason Kau Consultant Jasper County Schools Monticello, GA
On Tue, 5 Mar 2002, Jason Kau wrote: :Is there a reason why the "sftp" client included with OpenSSH does not present :an alphabetical listing of files when you do "ls"? no one has written code to do that yet. :I use the OpenSSH 3.0.2p1 "sftp" client on Linux, Solaris, AIX, and Digital :UNIX. Is this the expected behavior and is there any way to make it do :alphabetical directory listings or do I need to delve into the code and add :this functionality myself? the latter.
Jason Kau wrote:> Hello, > > I apologize if this is not the appropriate mailing list for this question. > > Is there a reason why the "sftp" client included with OpenSSH does not present > an alphabetical listing of files when you do "ls"?No one has written support for it. The "ls" implementation is very basic at the moment, we just take whatever the server sends us, in what ever order they send it. Ideally the ls should be rewritten to use the remote glob() function supplied by sftp-glob.[ch] and generate the long listings itself, rather than use the longname attribute from the server. This would make it possible to do things like "ls -l *.foo", "ls -C", etc. I suspect that the longname attribute will be going away in a future rev of the filexfer draft anyway, so such a rewrite will need to happy eventually. -d