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 [options] bookmark-name remote-directory local-files...
12
13       ncftpput -f login.cfg [options] remote-directory local-files...
14
15       ncftpput -c remote-host remote-path-name < stdin
16
17       ncftpput -C remote-host local-path-name remote-path-name
18

OPTIONS

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

DESCRIPTION

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

DIAGNOSTICS

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

AUTHOR

219       Mike Gleason, NcFTP Software (http://www.ncftp.com).
220

SEE ALSO

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