[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] sFTP and LS



Actually echo ls works better thanks for showing me that

 

 

--

Thank You,
John Place

284 Fuel Supply LLC
General Manager
Direct Line: 563-468-5289
Cell: 563-529-0162
Email: John.Place@xxxxxxxxxxxxxxx
            
Notice:  Any agreement discussed or implied in this message is for discussion purposes only and may not be relied upon to bind the company.  Agreements are binding only when fully committed to writing and executed by authorized representatives of all the parties.  The information contained herein, while provided in good faith and believed to be accurate, is provided by 284 Fuel Supply, LLC and or Iowa 80 Group, Inc. and their affiliates as an accommodation to their readers for information purposes only, it is not guaranteed as to accuracy or completeness.  The information contained in this communication is confidential and is intended only for the use of the addressee. It is solely the property of 284 Fuel Supply and or Iowa 80 Group Inc. and their affiliates. Unauthorized use of this information, in whole or in part, is strictly prohibited. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication, including all attachments and any copies.

 

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of Kevin Bucknum
Sent: Tuesday, November 24, 2020 08:52
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Ftpapi] sFTP and LS

 

sftp doesn't support redirection within the actual session, so that won't work. He's going to have to capture the entire output of the session and then parse that file. Several ways to do that. The QIBM_QSH_CMD_OUTPUT that Bryan mentioned. 

echo "ls" | sftp -i thekeyyouwanttouse kevin@172.24.1.36 > workbox.ls.txt

 

lftp can also do it, as well as curl if he has those installed.

 

 

On Tue, 2020-11-24 at 14:27 +0000, Julius, Kaj wrote:

I haven’t access to sftp, so purely a guess, but have you tried

 

ls /* > “/list.txt”

 

, i.e. specifying the remote sites home directory as the one you want to list and then the redirect as the second parameter. It seems that in both your examples below, the client can’t find either /> or “/list.txt” on the remote server. So I’m guessing that if a non-option parameter is supplied the first one must be the remote directory filter.

 

 

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of John Place
Sent: Monday, November 23, 2020 5:00 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] [Ftpapi] sFTP and LS

 

CAUTION: This email was sent from an EXTERNAL source. Use caution when clicking links or opening attachments.


Is it possible to redirect the ls listing to a stream file in the IFS using qshell?

 

The ls command displays the files in the sFTP site directory but I can’t seem to redirect them using (>) or -f or anything I can think of, let me know your thought pls.

 

--

Thank You,
John Place

284 Fuel Supply LLC
General Manager
Direct Line: 563-468-5289
Cell: 563-529-0162
Email: John.Place@xxxxxxxxxxxxxxx
            
Notice:  Any agreement discussed or implied in this message is for discussion purposes only and may not be relied upon to bind the company.  Agreements are binding only when fully committed to writing and executed by authorized representatives of all the parties.  The information contained herein, while provided in good faith and believed to be accurate, is provided by 284 Fuel Supply, LLC and or Iowa 80 Group, Inc. and their affiliates as an accommodation to their readers for information purposes only, it is not guaranteed as to accuracy or completeness.  The information contained in this communication is confidential and is intended only for the use of the addressee. It is solely the property of 284 Fuel Supply and or Iowa 80 Group Inc. and their affiliates. Unauthorized use of this information, in whole or in part, is strictly prohibited. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication, including all attachments and any copies.

 

 

INTERNAL USE ONLY

 

  Kevin  Bucknum
                   Senior Programmer Analyst
                   MEDDATA / MEDTRON
                   120 Innwood Drive
                   Covington LA 70433
                   Local: 985-893-2550
                   Toll Free: 877-893-2550
                 https://www.medtronsoftware.com

 

CONFIDENTIALITY NOTICE

This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged.  This information is intended only for the use of the individual or entity named above.  The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled.  If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED.  If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi