User Commands ncftpls(1)
NAME
ncftpls - Internet file transfer program for scripts
SYNOPSIS
ncftpls [options] ftp:/url.style/host/path/name/
OPTIONS
Command line flags:
-1 Most basic format, one item per line.
-l Long list format.
-R Long list format, recurse subdirectories.
Equivalent to "-x -lR".
-x -X Additional ls flags to pass on to the server.
-u X Use username X instead of anonymous.
-p X Use password X with the username.
-P X Use port number X instead of the default FTP ser-
vice port (21).
-d X Use the file X for debug logging.
-t X Timeout after X seconds.
-E Use regular (PORT) data connections.
-F Use passive (PASV) data connections. The default is
to use passive, but to fallback to regular if the
passive connection fails or times out.
-r X Redial a maximum of X times until connected to the
remote FTP server.
-W X Send raw FTP command X after logging in.
-X X Send raw FTP command X after each file transferred.
-Y X Send raw FTP command X before logging out.
The -W, -X, and -Y options are useful for advanced
users who need to tweak behavior on some servers.
For example, users accessing mainframes might need
to send some special SITE commands to set blocksize
and record format information.
For these options, you can use them multiple times
Software Last change: NcFTP 1
User Commands ncftpls(1)
each if you need to send multiple commands. For the
-X option, you can use the cookie %s to expand into
the name of the file that was transferred.
DESCRIPTION
The purpose of ncftpls is to do remote directory listings
using the File Transfer Protocol without entering an
interactive shell. This lets you write shell scripts or
other unattended processes that can do FTP.
The default behavior is to print the directory listing in
columnized format (i.e. ls -CF), but that is not very useful
for scripting. This example uses the -1 flag, to print one
file per line:
$ ncftpls -1 ftp:/ftp.ncftp.com/pub/ncftp/
You can also do a remote "ls -l", by using "ncftpls -l". If
you want to try other flags, you have to use them with the
-x flag. For example, if you wanted to do a remote
"ls -lrt", you could do this:
$ ncftpls -x "-lrt" ftp:/ftp.ncftp.com/pub/ncftp/
By default the program tries to open the remote host and
login anonymously, but you can specify a username and pass-
word information like you can with ncftpget or ncftpput.
DIAGNOSTICS
ncftpls returns the following exit values:
0 Success.
1 Could not connect to remote host.
2 Could not connect to remote host - timed out.
3 Transfer failed.
4 Transfer failed - timed out.
5 Directory change failed.
6 Directory change failed - timed out.
7 Malformed URL.
8 Usage error.
9 Error in login configuration file.
10 Library initialization failed.
Software Last change: NcFTP 2
User Commands ncftpls(1)
11 Session initialization failed.
AUTHOR
Mike Gleason, NcFTP Software (mgleason@ncftp.com).
SEE ALSO
ncftpput(1), ncftpget(1), ncftp(1), ftp(1), rcp(1), tftp(1).
LibNcFTP (http:/www.ncftp.com/libncftp/).
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWncftp
Interface Stability Volatile
NOTES
Source for ncftp is available on http:/opensolaris.org.
Software Last change: NcFTP 3
|