1ncftpls(1)                  General Commands Manual                 ncftpls(1)
2
3
4

NAME

6       ncftpls - Internet file transfer program for scripts
7

SYNOPSIS

9       ncftpls [options] ftp://url.style/host/path/name/
10

OPTIONS

12   Command line flags:
13       -m      Use  a machine readable list format, if the server supports it.
14               This requires that the server software support the MLSD  exten‐
15               sions, and many implementations do not have these features.
16
17       -1      Most basic format, one item per line.
18
19       -l      Long list format.
20
21       -C      Columnized list format. This is the default list format.
22
23       -R      Recurse all subdirectories while listing.
24
25       -a      Show all files, if server allows it (as in "/bin/ls -a").
26
27       -i XX   Filter  the  listing  (if server supports it) with the wildcard
28               XX.
29
30       -x -XX  Set the ls flags to use on the server.
31
32       -u XX   Use username XX instead of anonymous.
33
34       -p XX   Use password XX with the username.
35
36       -P XX   Use port number XX instead of  the  default  FTP  service  port
37               (21).
38
39       -d XX   Use the file XX for debug logging.
40
41       -t XX   Timeout after XX seconds.
42
43       -E      Use regular (PORT) data connections.
44
45       -F      Use  passive  (PASV)  data  connections.  The default is to use
46               passive, but to fallback to regular if the  passive  connection
47               fails or times out.
48
49       -r XX   Redial  a maximum of XX times until connected to the remote FTP
50               server.
51
52       -W XX   Send raw FTP command XX after logging in.
53
54       -X XX   Send raw FTP command XX after each file transferred.
55
56       -Y XX   Send raw FTP command XX before logging out.
57
58               The -W, -X, and -Y options are useful for  advanced  users  who
59               need  to  tweak  behavior  on some servers.  For example, users
60               accessing mainframes might need to send some special SITE  com‐
61               mands to set blocksize and record format information.
62
63               For  these options, you can use them multiple times each if you
64               need to send multiple commands.  For the -X option, you can use
65               the  cookie  %s  to  expand  into the name of the file that was
66               transferred.
67
68       -o XX   Set advanced option XX.
69
70               This option is used primarily for debugging.  It sets the value
71               of  an internal variable to an integer value.  An example usage
72               would be: -o useFEAT=0,useCLNT=1 which in this  case,  disables
73               use  of  the  FEAT  command  and enables the CLNT command.  The
74               available variables include: usePASV, useSIZE,  useMDTM,  useR‐
75               EST,  useNLST_a, useNLST_d, useFEAT, useMLSD, useMLST, useCLNT,
76               useHELP_SITE, useSITE_UTIME, STATfileParamWorks, NLSTfileParam‐
77               Works, require20, allowProxyForPORT, doNotGetStartCWD.
78

DESCRIPTION

80       The  purpose  of  ncftpls  is to do remote directory listings using the
81       File Transfer Protocol without entering  an  interactive  shell.   This
82       lets  you write shell scripts or other unattended processes that can do
83       FTP.
84
85       The default behavior is to print the directory  listing  in  columnized
86       format  (i.e. ls -CF), but that is not very useful for scripting.  This
87       example uses the -1 flag, to print one file per line:
88
89           $ ncftpls -1 ftp://ftp.ncftp.com/pub/ncftp/
90
91       You can also do a remote "ls -l", by using "ncftpls -l".  If  you  want
92       to  try  other flags, you have to use them with the -x flag.  For exam‐
93       ple, if you wanted to do a remote "ls -lrt", you could do this:
94
95           $ ncftpls -x "-lrt" ftp://ftp.ncftp.com/pub/ncftp/
96
97       By default the program tries to open the remote host and  login  anony‐
98       mously,  but  you  can specify a username and password information like
99       you can with ncftpget or ncftpput.
100
101       Note that the standard specifies that URL pathnames  are  are  relative
102       pathnames.   For  FTP,  this means that URLs specify relative pathnames
103       from the start directory, which for  user  logins,  are  typically  the
104       user's home directory.  If you want to use absolute pathnames, you need
105       to include a literal slash, using the "%2F" code for a  "/"  character.
106       Examples:
107
108           $ ncftpls -u linus ftp://ftp.kernel.org/%2Fusr/src/
109           $ ncftpls ftp://steve@ftp.apple.com/%2Fetc/
110

DIAGNOSTICS

112       ncftpls returns the following exit values:
113
114       0       Success.
115
116       1       Could not connect to remote host.
117
118       2       Could not connect to remote host - timed out.
119
120       3       Transfer failed.
121
122       4       Transfer failed - timed out.
123
124       5       Directory change failed.
125
126       6       Directory change failed - timed out.
127
128       7       Malformed URL.
129
130       8       Usage error.
131
132       9       Error in login configuration file.
133
134       10      Library initialization failed.
135
136       11      Session initialization failed.
137

AUTHOR

139       Mike Gleason, NcFTP Software (http://www.ncftp.com).
140

SEE ALSO

142       ncftpput(1), ncftpget(1), ncftp(1), ftp(1), rcp(1), tftp(1).
143
144       LibNcFTP (http://www.ncftp.com/libncftp/).
145
146
147
148ncftpls                         NcFTP Software                      ncftpls(1)
Impressum