Home Man
Today's Posts

HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Ftp command nlist not supporting in sftp


Login to Reply

Thread Tools Search this Thread
# 1  
Old 05-01-2017
Ftp command nlist not supporting in sftp


We are using HP-UX. Previously we were using ftp to connect to remote list the text file name and copy into local file with .ls extension. For this we are using
nlist RBOBAR*.txt DMSFT.ls

now we want to convert the integration with sftp. So In sftp nlist command is not supported. How can we write a script to copy the remote file name lists to local directory into the file in sftp. Can anyone help me to solve the concern . Thanking you advance.

Last edited by jim mcnamara; 05-01-2017 at 11:34 AM.. Reason: code tags
# 2  
Old 05-01-2017
The nlist ftp command in sftp is ls

Some sftp servers support dir

So, change nlist to ls
# 3  
Old 05-02-2017
Originally Posted by jim mcnamara
The nlist ftp command in sftp is ls

Some sftp servers support dir

So, change nlist to ls

Hi Jim,

Thanks for your reply...

I have used ls in script instead of nlist. But it only lists the file. My requirement is to copy the name of file listed to a local file through sftp.
# 4  
Old 05-02-2017
sftp does not have this command or anything like it. You will have to capture sftp's output and process it.
# 5  
Old 05-02-2017
wouldn't sftp's get with wildcard do the trick?
# 6  
Old 05-02-2017
Depends on what he's trying to do. If in the end all he needs to do is retrieve a list of files matching wildcards, mget will do.
# 7  
Old 05-02-2017
sftp me@anothercomputer <<! > listoffilenames.txt
cd /path/to/files
ls RBOBAR*.txt DMSFT.ls
# want to see what you got? add this line
cat listoffilenames.txt

Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Supporting NIC speed solaris_1977 Solaris 7 12-13-2012 09:51 AM
SFTP-how to log individual sftp command error while executing shell script noobrobot Shell Programming and Scripting 1 10-09-2011 07:17 PM
Supporting Others' Scripts Vi-Curious Shell Programming and Scripting 2 04-08-2011 04:26 PM
RHEL 3 is not supporting SCASI disk daya.pandit Red Hat 2 03-24-2009 12:22 AM
RHEL 3 is not supporting SCASI Disk daya.pandit Linux 1 03-23-2009 08:56 AM
tool supporting SPL vijaya2006 HP-UX 0 07-31-2006 05:34 AM
Issue with AIX 5.3 and nlist/nlist64/knlist lawrence AIX 0 03-03-2005 02:19 PM

All times are GMT -4. The time now is 01:12 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password