Program description:Original Author Jerome lacaille, code size: k48.Environment: C #,. netThe following is a description by the author of the translation.IntroductionAt this time, I wrote a C # component for the first time. I decided to create a component to implement FTP. Here is a simple code to use this component. I cannot guarantee that the code of this component can work well under any circumstances, but I think I will improve it in the feedback
1. Connect to the FTP serverFormat: FTP [hostname| ip-address]A) FTP ftp.drivehq.comb) The server asks for your username and password, and then you can enter it.2. Download the fileThe download file usually uses the get and mget two commands.a) GetFormat: Get [Remote-file] [Local-file]Transfers a single file from the r
mode, plus the control switch passive mode to see the situation plus if the upload using passive mode Entering Passive Mode errorBinary: Binary transferCD: Server side CD LCD: Client CD put upload single mput upload multiple get download single mget download multiple Prompt Multiple Tips#========================start Shell Script ============================#!/bin/bash#定义备份数据库时使用的用户名和密码db_user = "root" db_passwd= "111111"#定义
1. ftp automatically logs in to batch download files.
Copy codeThe Code is as follows: ##### migrate/home/data from the ftp server to the local/home/databackup ####
#! /Bin/bash
Ftp-n Open 192.168.1.171
User guest 123456.
Binary
Cd/home/data
LCD/home/databackup
Prompt
Mget *
Close
Bye
!
2.
Configure Mysql virtual FTP account 1. Mysql connection in pure-ftpd on the ftp server
[root@localhost ~]# mysql -uroot -pxxxxxx(your mysql password)
2. create a mysql authentication database
mysql>create database pureftpd;mysql>grant privileges all on pureftpd.* to pureftpuser@localhost identified by 'pureftpuser';mysql>flush privileges;mysql>use pureftpd;Mysql> create table if not exists `users`(`use
Overall environment: Open the server and client, set two machines to the same network segment and enable it to ping, set FTP "Web" role service tick FTPVerify basic and Anonymous authentication: Set the File "FTP" in the D drive and create a new file "NTD1, NTD2" in the folderSet ftp-Select Web Site-right-click New FTP
ASCII: Set to transfer files in ASCII (default)
Bell: Every time you complete a file transfer, Alarm prompts.
Binary: Sets the file to be routed in binary mode.
Bye: Terminates the host FTP process and exits the FTP admin mode.
Case: When on, use the mget command to copy the filename to the local machine and convert all lowercase letters.
CD: cd command with UNIX
This code contains an example of all files under a directory on the FTP server.
If you need to download all files of the. txt type under a directory, please
Mget *.*Change intoMget *.txt
If you need to download a certain file in a directory a.txt, pleaseMget *.*Change intoGet A.txt
@echo off
rem Specifies the FTP user name
set ftpuser=ftpusername
rem Spec
Space size: 50MProgramming Language: Html/aspFile Upload: Ftp/webDomain name: Send two level domain name (experience card can be tied top meter)Advertisement: NoNote: 1, registration information truthfully fill out, we will conduct a review;2, the space opening 5th must submit the record information, otherwise will delete;3, do not allow the operation of chat rooms, large community, message Board, Forum procedures (Electronic bulletin services) and ri
Jiang Network to provide 50M free static space applications, specific please see their application instructions, instant application Open, with Control Panel, space support HTML script, support FTP upload management, the space is self-service application open, please do not maliciously repeated excessive application of multiple space!
Their statement:
Free Space Application
Space Free Application process:1, Registered Longjiang network http://dqcom
files and directories on the FTP server. You can use the ls command to view only the files. */
6. mkdir qint/* Create a qint directory under the root directory on the FTP server. */
7. cd qint/* Enter the directory qint, and use "cd your directory name" to enter the next level directory of the current directory, which is the same as DOS. */
8. bin/* Uses binary transmission. If you want to upload and downl
you log on to the FTP server, you can use the Dir command to view the files and directories on the FTP server. You can use the LS command to view only the files. */
6. mkdir qint/* Create a qint directory under the root directory on the FTP server. */
7. CD qint/* Enter the directory qint, and use "CD your directory name" to enter the next level directory of
/* After you log on to the FTP server, you can use the Dir command to view the files and directories on the FTP server. You can use the LS command to view only the files. */
6. mkdir qint/* Create a qint directory under the root directory on the FTP server. */
7. CD qint/* Enter the directory qint, and use "CD your directory name" to enter the next level dire
server and map the anonymous user of the virtual server to the local user FTP2Vi/etc/vsftpd/vsftpd2.confPam_service_name=vsftpdlisten_address=192.168.1.71Ftp_username=ftp2(7). Restart Service Effective: Services VSFTPD restart
Use FTP command under DOS:
1. Switch to the specified directory2. Connection Target FTP server: FTP 10.137.97.293. Enter account number
address and domain restrictions, click "Add a new Deny entry"5. Command-line access to multi-file downloads:Open the user's computer, open the command line "Windows+r"Enter "The disk you want to download +": "EnterThen enter "FTP + server IP Address" carriage return"User (192.168.1.1: (none)):" Enter the new user name for the server, enter the password for "New username password" carriage returnRe-enter: "dir" Enter to view files on FTPEnter: "LS" En
the IP address of the FTP server#从! Ftprun to the end of the code! Ftprun is an FTP command. #! Ftprun is his own random name. User User01 User01#给出FTP的用户名和密码. Here the user name and password are: User01 Prompt#该命令忽略FTP交互 Bin#二进制格式传送 CD TXT#TXT表示数据文件在FTP服务器上的目录. Lcd/app/inf
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.