LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2017, 09:44 PM   #1
sysmicuser
Member
 
Registered: Mar 2010
Posts: 458

Rep: Reputation: 0
Unhappy 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.
 
Old 01-27-2017, 04:31 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
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).
 
Old 01-30-2017, 06:41 PM   #3
sysmicuser
Member
 
Registered: Mar 2010
Posts: 458

Original Poster
Rep: Reputation: 0
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cURL command clarification dumblinuxuser Linux - Newbie 6 08-09-2016 10:42 PM
Does bash script has equivalent set /p command as Windows shell command? ncheng Linux - Newbie 5 06-30-2016 06:29 AM
using cURL from the command line lauram93 Linux - Software 4 06-05-2009 02:08 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 03:23 AM
Using Curl command backpackingbiker Ubuntu 1 06-21-2005 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration