-   Linux - Newbie (
-   -   Any equivalent of ls -larth for curl command ? (

sysmicuser 01-26-2017 08:44 PM

Any equivalent of ls -larth for curl command ?
Hello Friends,

I am using curl command at its basic usage as below:

curl sftp://<name of sftp server>/<directory path to list files> -u<username> | tee -a logfile

However the problem is with above command it is listing files in haphazard manner. if it can list files in same way like unix ls -larth that would be great.

I can do this by doing sftp to the sftp server but that is taking ages therefore the need to use the curl command. I was told to use curl as an quicker and efficient approach to list file on sftp server.

Would appreciate input from Learned Gurus.

Thanks in advance.

hydrurga 01-27-2017 03:31 AM

It's difficult to say what you can do since "haphazard manner" gives no idea of the sort of output you are getting, but for more control you could try piping the final output through sort (see man sort).

sysmicuser 01-30-2017 05:41 PM

Apologies for not stating clearly of what I mean by "haphazard manner" what I meant was files are not listed in reverse timestamp order. sort as the end won't help. Any ideas?

All times are GMT -5. The time now is 05:36 AM.