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

NAME

6       ncftpput - Internet file transfer program for scripts
7

SYNOPSIS

9       ncftpput [options] remote-host remote-directory local-files...
10
11       ncftpput -f login.cfg [options] remote-directory local-files...
12
13       ncftpput -c remote-host remote-path-name < stdin
14
15       ncftpput -C remote-host local-path-name remote-path-name
16

OPTIONS

18   Command line flags:
19       -u XX   Use username XX instead of anonymous.
20
21       -p XX   Use password XX with the username.
22
23       -P XX   Use  port  number  XX  instead  of the default FTP service port
24               (21).
25
26       -j XX   Use account XX in supplement to the username and password (dep‐
27               recated).
28
29       -d XX   Use the file XX for debug logging.
30
31       -a      Use ASCII transfer type instead of binary.
32
33       -m      Attempt  to  make the remote destination directory before copy‐
34               ing.
35
36       -t XX   Timeout after XX seconds.
37
38       -U XX   Use value XX for the umask.
39
40       -v/-V   Do (do not)  use  progress  meters.   The  default  is  to  use
41               progress meters if the output stream is a TTY.
42
43       -f XX   Read the file XX for host, user, and password information.
44
45       -c      Read  locally  from standard input and write remotely to speci‐
46               fied pathname.
47
48       -C      Similar to -c, except a local pathname is specified.
49
50       -A      Append to remote files, instead of overwriting them.
51
52       -T XX   Upload into temporary files prefixed by XX.
53
54       -S XX   Upload into temporary files suffixed by XX.
55
56       -R      Recursive mode; copy whole directory trees.
57
58       -r XX   Redial a maximum of XX times until connected to the remote  FTP
59               server.
60
61       -z/-Z   Do (do not) try to resume transfers.  The default is to not try
62               to resume (-Z).
63
64       -E      Use regular (PORT) data connections.
65
66       -F      Use passive (PASV) data connections.  The  default  is  to  use
67               passive,  but  to fallback to regular if the passive connection
68               fails or times out.
69
70       -DD     Delete local file after successfully uploading it.
71
72       -y      Try using "SITE UTIME" to preserve timestamps on  remote  host.
73               Not many remote FTP servers support this, so it may not work.
74
75       -b      Run  in background (by submitting a batch job and then spawning
76               ncftpbatch).
77
78       -bb     Similar to -b option, but only submits the batch job.  You will
79               need to run ncftpbatch for the batch job to be processed.  This
80               is useful if you already have a ncftpbatch process running,  or
81               wish to have better control of when batch jobs are processed.
82
83               For example, if you wanted to do background processing of three
84               files all on the same remote server, it is more polite  to  use
85               just  one  ncftpbatch process to process the three jobs sequen‐
86               tially, rather than  having  three  ncftpbatch  processes  open
87               three simultaneous FTP sessions to the same server.
88
89       -B XX   Try setting the TCP/IP socket buffer size to XX bytes.
90
91       -W XX   Send raw FTP command XX after logging in.
92
93       -X XX   Send raw FTP command XX after each file transferred.
94
95       -Y XX   Send raw FTP command XX before logging out.
96
97               The  -W,  -X,  and -Y options are useful for advanced users who
98               need to tweak behavior on some  servers.   For  example,  users
99               accessing  mainframes might need to send some special SITE com‐
100               mands to set blocksize and record format information.
101
102               For these options, you can use them multiple times each if  you
103               need to send multiple commands.  For the -X option, you can use
104               the cookie %s to expand into the name  of  the  file  that  was
105               transferred.
106
107       -o XX   Set advanced option XX.
108
109               This option is used primarily for debugging.  It sets the value
110               of an internal variable to an integer value.  An example  usage
111               would  be:  -o useFEAT=0,useCLNT=1 which in this case, disables
112               use of the FEAT command and  enables  the  CLNT  command.   The
113               available  variables  include: usePASV, useSIZE, useMDTM, useR‐
114               EST, useNLST_a, useNLST_d, useFEAT, useMLSD, useMLST,  useCLNT,
115               useHELP_SITE, useSITE_UTIME, STATfileParamWorks, NLSTfileParam‐
116               Works, require20, allowProxyForPORT, doNotGetStartCWD.
117

DESCRIPTION

119       The purpose of ncftpput is to do file transfers from  the  command-line
120       without  entering  an  interactive  shell.   This  lets you write shell
121       scripts or other unattended processes that can do FTP.  It is also use‐
122       ful  for  advanced  users who want to send files from the shell command
123       line without entering an interactive FTP program such as ncftp.
124
125       By default the program tries to open the remote host and  login  anony‐
126       mously,  but  you can specify a username and password information.  The
127       -u option is used to specify the username  to  login  as,  and  the  -p
128       option is used to specify the password.  If you are running the program
129       from the shell, you may omit the -p option and the program will  prompt
130       you for the password.
131
132       Using  the  -u and -p options are not recommended, because your account
133       information is exposed to anyone who can see your shell script or  your
134       process  information.   For example, someone using the ps program could
135       see your password while the program runs.
136
137       You may use the -f option instead to specify a file  with  the  account
138       information.   However, this is still not secure because anyone who has
139       read access to the information file can see  the  account  information.
140       Nevertheless,  if  you choose to use the -f option the file should look
141       something like this:
142
143              host sphygmomanometer.ncftp.com
144              user gleason
145              pass mypassword
146
147       Don't forget to change the permissions on this file so no one else  can
148       read them.
149
150       The -d option is very useful when you are trying to diagnose why a file
151       transfer is failing.  It prints out the entire FTP conversation to  the
152       file  you  specify,  so you can get an idea of what went wrong.  If you
153       specify the special name stdout as the name  of  the  debugging  output
154       file, the output will instead print to the screen.
155
156       Using  ASCII  mode is helpful when the text format of your host differs
157       from that of the remote host.  For example, if you are sending  a  text
158       file  from  a UNIX system to a Windows-based host, you could use the -a
159       flag which would use ASCII transfer mode so that the  file  created  on
160       the  Windows  machine would be in its native text format instead of the
161       UNIX text format.
162
163       You can upload an entire directory tree of files by using the -R  flag.
164       Example:
165
166           $ ncftpput -R pikachu.nintendo.co.jp /incoming /tmp/stuff
167
168       This would create a /incoming/stuff hierarchy on the remote host.
169
170       The  -T  and  -S options are useful when you want to upload file to the
171       remote host, but you don't want to use the destination  pathname  until
172       the  file  is  complete.   Using  these options, you will not destroy a
173       remote file by the same  name  until  your  file  is  finished.   These
174       options  are also useful when a remote process on the remote host polls
175       a specific filename, and you don't want that process to see  that  file
176       until  you  know the file is finished sending.  Here is an example that
177       uploads  to  the  file   /pub/incoming/README,   using   the   filename
178       /pub/incoming/README.tmp as a temporary filename:
179
180           $ ncftpput -S .tmp bowser.nintendo.co.jp /pub/incoming /a/README
181
182       A neat way to pipe the output from any local command into a remote file
183       is to use the -c option, which  denotes  that  you're  using  stdin  as
184       input.   The  following example shows how to make a backup and store it
185       on a remote machine:
186
187           $ tar cf - / | ncftpput -c sonic.sega.co.jp /usr/local/backup.tar
188

DIAGNOSTICS

190       ncftpput returns the following exit values:
191
192       0       Success.
193
194       1       Could not connect to remote host.
195
196       2       Could not connect to remote host - timed out.
197
198       3       Transfer failed.
199
200       4       Transfer failed - timed out.
201
202       5       Directory change failed.
203
204       6       Directory change failed - timed out.
205
206       7       Malformed URL.
207
208       8       Usage error.
209
210       9       Error in login configuration file.
211
212       10      Library initialization failed.
213
214       11      Session initialization failed.
215

AUTHOR

217       Mike Gleason, NcFTP Software (http://www.ncftp.com).
218

SEE ALSO

220       ncftpget(1), ncftp(1), ftp(1), rcp(1), tftp(1).
221
222       LibNcFTP (http://www.ncftp.com/libncftp/).
223
224
225
226ncftpput                        NcFTP Software                     ncftpput(1)
Impressum