1 .TH ncftpput 1 NcFTP Software
3 ncftpput - Internet file transfer program for scripts
8 .I "remote-host" "remote-directory" "local-files..."
14 .I "remote-directory" "local-files..."
18 .I "remote-host" "remote-path-name"
40 instead of the default FTP service port (21).
45 in supplement to the username and password (deprecated).
53 Use ASCII transfer type instead of binary.
56 Attempt to make the remote destination directory
70 Do (do not) use progress meters.
71 The default is to use progress meters if the output stream is a TTY.
76 for host, user, and password information.
79 Append to remote files, instead of overwriting them.
82 Upload into temporary files prefixed by
86 Upload into temporary files suffixed by
90 Recursive mode; copy whole directory trees.
95 times until connected to the remote FTP server.
98 Do (do not) try to resume transfers.
104 Use regular (PORT) data connections.
107 Use passive (PASV) data connections.
108 The default is to use passive, but to fallback to
109 regular if the passive connection fails or times out.
112 Delete local file after successfully uploading it.
115 Try using "SITE UTIME" to preserve timestamps on remote host.
116 Not many remote FTP servers support this, so it may not work.
119 Run in background (by submitting a job to
123 Try setting the TCP/IP socket buffer size to
133 is to do file transfers from the command-line
134 without entering an interactive shell.
135 This lets you write shell scripts or other unattended
136 processes that can do FTP.
137 It is also useful for advanced users who
138 want to send files from the shell command line without
139 entering an interactive FTP program such as
142 By default the program tries to open the remote host
143 and login anonymously, but you can specify a username
144 and password information.
147 option is used to specify the username to login as,
150 option is used to specify the password.
151 If you are running the program from the shell, you may
154 option and the program will prompt you for the password.
160 options are not recommended, because your account information
161 is exposed to anyone who can see your shell script or your
162 process information. For example, someone using the
164 program could see your password while the program runs.
168 option instead to specify a file with the account information.
169 However, this is still not secure because anyone who
170 has read access to the information file can see the
172 Nevertheless, if you choose to use the
174 option the file should look something like this:
177 host sphygmomanometer.ncftp.com
185 Don't forget to change the permissions on this file
186 so no one else can read them.
190 option is very useful when you are trying to diagnose
191 why a file transfer is failing.
193 entire FTP conversation to the file you specify, so
194 you can get an idea of what went wrong.
195 If you specify the special name
197 as the name of the debugging output file, the output
198 will instead print to the screen.
200 Using ASCII mode is helpful when the text format of your host
201 differs from that of the remote host.
202 For example, if you are sending a text file from
203 a UNIX system to a Windows-based host, you could use the
205 flag which would use ASCII transfer mode so that the file
206 created on the Windows machine would be in its native text
207 format instead of the UNIX text format.
209 You can upload an entire directory tree of files by
216 $ ncftpput -R pikachu.nintendo.co.jp /incoming /tmp/stuff
220 This would create a /incoming/stuff hierarchy on
227 options are useful when you want to upload file
228 to the remote host, but you don't want to use
229 the destination pathname until the file is
231 Using these options, you will not destroy a
232 remote file by the same name until your file
234 These options are also useful when a remote
235 process on the remote host polls a specific
236 filename, and you don't want that process to
237 see that file until you know the file is
239 Here is an example that uploads to the file
240 /pub/incoming/README, using the filename
241 /pub/incoming/README.tmp as a temporary
245 $ ncftpput -S \.tmp bowser\.nintendo\.co\.jp /pub/incoming /a/README
248 A neat way to pipe the output from any local command into
249 a remote file is to use the
251 option, which denotes that you're using
254 The following example shows how to make a backup and store
255 it on a remote machine:
258 $ tar cf / | ncftpput -c sonic\.sega\.co\.jp /usr/local/backup.tar
265 returns the following exit values:
271 Could not connect to remote host.
274 Could not connect to remote host - timed out.
280 Transfer failed - timed out.
283 Directory change failed.
286 Directory change failed - timed out.
295 Error in login configuration file.
298 Library initialization failed.
301 Session initialization failed.
306 Mike Gleason, NcFTP Software (mgleason@ncftp.com).
317 .IR "LibNcFTP" " (http://www.ncftp.com/libncftp/)."