⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ncftpput.1

📁 实现ftp协议客户端的源代码
💻 1
字号:
.TH ncftpput 1 "NcFTP Software" ncftpput.SH NAMEncftpput - Internet file transfer program for scripts.SH "SYNOPSIS".PP.B ncftpput.RI [ "options" ].I "remote-host" "remote-directory" "local-files...".PP.B ncftpput-f.I "login.cfg".RI [ "options" ].I "remote-directory" "local-files...".PP.B ncftpput-c.I "remote-host" "remote-path-name"<.I "stdin".\"-------.SH "OPTIONS".\"-------.SSCommand line flags:.TP 8.RI "-u " "XX"Use username.I XXinstead of anonymous..TP 8.RI "-p " "XX"Use password.I XXwith the username..TP 8.RI "-P " "XX"Use port number.I XXinstead of the default FTP service port (21)..TP 8.RI "-d " "XX"Use the file.I XXfor debug logging..TP 8-aUse ASCII transfer type instead of binary..TP 8-mAttempt to make the remote destination directorybefore copying..TP 8.RI "-t " "XX"Timeout after.I XXseconds..TP 8.RI "-U " "XX"Use value.I XXfor the umask..TP 8-v/-VDo (do not) use progress meters.The default is to use progress meters if the output stream is a TTY..TP 8.RI "-f " "XX"Read the file.I XXfor host, user, and password information..TP 8-AAppend to remote files, instead of overwriting them..TP 8.RI "-T " "XX"Upload into temporary files prefixed by.IR "XX" ".".TP 8.RI "-S " "XX"Upload into temporary files suffixed by.IR "XX" ".".TP 8-RRecursive mode; copy whole directory trees..TP 8.RI "-r " "XX"Redial a maximum of .I XXtimes until connected to the remote FTP server..TP 8-z/-ZDo (do not) try to resume transfers.The default is to.I nottry to resume (\-Z)..TP 8-FUse passive (PASV) data connections..TP 8-DDDelete local file after successfully uploading it..TP 8-yTry using "SITE UTIME" to preserve timestamps on remote host.Not many remote FTP servers support this, so it may not work..\"-------.SH "DESCRIPTION".\"-------.PPThepurpose of.I ncftpputis to do file transfers from the command-linewithout entering an interactive shell.This lets you write shell scripts or other unattendedprocesses that can do FTP.It is also useful for advanced users whowant to send files from the shell command line withoutentering an interactive FTP program such as.IR ncftp ".".PPBy default the program tries to open the remote hostand login anonymously, but you can specify a usernameand password information.The.B -uoption is used to specify the username to login as,and the.B -poption is used to specify the password.If you are running the program from the shell, you mayomit the.B -poption and the program will prompt you for the password..PPUsing the .B -uand.B -poptions are not recommended, because your account informationis exposed to anyone who can see your shell script or yourprocess information.  For example, someone using the.I psprogram could see your password while the program runs..PPYou may use the.B -foption instead to specify a file with the account information.However, this is still not secure because anyone whohas read access to the information file can see theaccount information.Nevertheless, if you choose to use the.B -foption the file should look something like this:.RS.sphost Bozo.probe.net.bruser gleason.brpass mypasswd.br.sp.REDon't forget to change the permissions on this fileso no one else can read them..PPThe.B -doption is very useful when you are trying to diagnosewhy a file transfer is failing.It prints out theentire FTP conversation to the file you specify, soyou can get an idea of what went wrong.  If you specify the special name.I stdoutas the name of the debugging output file, the outputwill instead print to the screen..PPUsing ASCII mode is helpful when the text format of your hostdiffers from that of the remote host.For example, if you are sending a text file froma UNIX system to a Windows-based host, you could use the.B -aflag which would use ASCII transfer mode so that the filecreated on the Windows machine would be in its native textformat instead of the UNIX text format..PPYou can upload an entire directory tree of files byusing the.B -Rflag.Example:.RS 4.sp$ ncftpput -R ftp.probe.net /incoming /tmp/stuff.br.sp.REThis would create a /incoming/stuff hierarchy onthe remote host..PPThe.B -Tand.B -Soptions are useful when you want to upload fileto the remote host, but you don't want to usethe destination pathname until the file iscomplete.Using these options, you will not destroy aremote file by the same name until your fileis finished.These options are also useful when a remoteprocess on the remote host polls a specificfilename, and you don't want that process tosee that file until you know the file isfinished sending.Here is an example that uploads to the file/pub/incoming/README, using the filename/pub/incoming/README.tmp as a temporaryfilename:.RS 4.sp$ ncftpput -S \.tmp Bozo\.probe\.net /pub/incoming /a/README.RE.PPA neat way to pipe the output from any local command intoa remote file is to use the.B -coption, which denotes that you're using.I stdinas input.The following example shows how to make a backup and storeit on a remote machine:.RS 4.sp$ tar cf / | ncftpput -c Bozo\.probe\.net /usr/local/backup.tar.RE.\"-------.SH "DIAGNOSTICS".\"-------.PP.I ncftpputreturns the following exit values:.TP 80Success..TP 81Could not connect to remote host..TP 82Could not connect to remote host - timed out..TP 83Transfer failed..TP 84Transfer failed - timed out..TP 85Directory change failed..TP 86Directory change failed - timed out..TP 87Malformed URL..TP 88Usage error..TP 89Error in login configuration file..TP 810Library initialization failed..TP 811Session initialization failed..\"-------.SH "AUTHOR".\"-------.PPMike Gleason, NcFTP Software (http://www.ncftp.com)..\"-------.SH "SEE ALSO".\"-------.PP.IR ncftpget (1),.IR ncftp (1),.IR ftp (1),.IR rcp (1),.IR tftp (1)..PP.IR "LibNcFTP" " (http://www.ncftp.com/libncftp/)."

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -