.TH ncftpls 1 NcFTP Software .SH NAME ncftpls - Internet file transfer program for scripts .SH "SYNOPSIS" .PP .B ncftpls .RI [ "options" ] .I "ftp://url.style/host/path/name/" .\"------- .SH "OPTIONS" .\"------- .SS Command line flags: .TP 8 .B \-1 Most basic format, one item per line. .TP 8 .B \-l Long list format. .TP 8 .BI "-x -" "XX" Additional .I ls flags to pass on to the server. .TP 8 .BI "-u " "XX" Use username .I XX instead of anonymous. .TP 8 .BI "-p " "XX" Use password .I XX with the username. .TP 8 .BI "-P " "XX" Use port number .I XX instead of the default FTP service port (21). .TP 8 .BI "-d " "XX" Use the file .I XX for debug logging. .TP 8 .BI "-t " "XX" Timeout after .I XX seconds. .TP 8 .B -E Use regular (PORT) data connections. .TP 8 .B -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. .TP 8 .BI "-r " "XX" Redial a maximum of .I XX times until connected to the remote FTP server. .\"------- .SH "DESCRIPTION" .\"------- .PP The purpose of .I 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. .PP 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 .B \-1 flag, to print one file per line: .RS 4 .br .sp $ ncftpls -1 ftp://ftp.ncftp.com/pub/ncftp/ .RE .PP 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 .B \-x flag. For example, if you wanted to do a remote "ls\ \-lrt", you could do this: .RS 4 .br .sp $ ncftpls -x "-lrt" ftp://ftp.ncftp.com/pub/ncftp/ .RE .PP By default the program tries to open the remote host and login anonymously, but you can specify a username and password information like you can with .I ncftpget or .IR ncftpput "." .\"------- .SH "DIAGNOSTICS" .\"------- .PP .I ncftpls returns the following exit values: .TP 8 0 Success. .TP 8 1 Could not connect to remote host. .TP 8 2 Could not connect to remote host - timed out. .TP 8 3 Transfer failed. .TP 8 4 Transfer failed - timed out. .TP 8 5 Directory change failed. .TP 8 6 Directory change failed - timed out. .TP 8 7 Malformed URL. .TP 8 8 Usage error. .TP 8 9 Error in login configuration file. .TP 8 10 Library initialization failed. .TP 8 11 Session initialization failed. .\"------- .SH "AUTHOR" .\"------- .PP Mike Gleason, NcFTP Software (mgleason@ncftp.com). .\"------- .SH "SEE ALSO" .\"------- .PP .IR ncftpput (1), .IR ncftpget(1), .IR ncftp (1), .IR ftp (1), .IR rcp (1), .IR tftp (1). .PP .IR "LibNcFTP" " (http://www.ncftp.com/libncftp/)."