Upload ftp data to the server in linux

Source: Internet
Author: User
Tags ftp commands ftp login
In linux, ftp uploads data to the server LinuxftpFTP is the standard file transfer protocol of ARPANet, and the network is the predecessor of the Internet today. We usually use ftp commands, mainly to upload and download files. ftp login users are usually some virtual users, because this is for security...
In linux, ftp uploads data to the server. in Linux, ftp is the standard file transfer protocol of ARPANet, and the network is the predecessor of the Internet today. We usually use ftp commands, mainly to upload and download files. ftp login users are generally some virtual users, because this is for security considerations. Www.2cto.com syntax: ftp [-dignv] [host name or IP address] parameter:-v shows the command execution process. -N does not use automatic login. -G disables the extension feature of special characters for the local host file name. -I disable the interactive mode and do not ask any questions. -D displays the instruction execution process in detail to facilitate troubleshooting or analyzing program execution. Example: log on to 124.16.144.120 and run the command [root @ localhost lane6] $ ftp 124.16.144.120Connected to 124.16.144.120.220 (vsFTPd 2.0.5) 530 Please login with USER and PASS.530 Please login with USER and. KERBEROS_V4 rejected as an authentication typeName (124.16.144.120: root): anonymous # Username 331 Please specify the password. # Password of the User: 230 Login successful. remote system type is UNIX. using binary mode to transfer file S. The get and mget commands are usually used to download files. A) get Format: get [remote-file] [local-file] transfers files from the remote host to the local host. to obtain c: \ a \ 1.jpgon the server, ftp> get/a/1.jpg 1.jpg (press enter) B) mget format: mget [remote-files] receives a batch of files from the remote host to the local host. to obtain all files under E: \ a \ on the server, ftp> cd/a ftp> mget *. * (press enter) and enter the prompt command under ftp. if batch retrieval is performed, no one is prompted. Note: All files are downloaded to the current directory of the linux host. For example, if you run the ftp command in/root/web, all files are downloaded to/root/web. 3. upload file a) put format: put local-file [remote-file] transfers a local file to the remote host. if you want to transfer your 1.jpg file to the remote host c: \ a, and change it to 2.gif ftp> put 1.jpg/a/2.gif (press enter) B) mput format: mput local-files to transfer a batch of files from the local host to the remote host. to upload all bmp files in the current local directory to the ftp server c: \ a> cd/a (press enter) ftp> mput *. jpg (press enter) Note: all uploaded files are from the current directory of the host. For example, the ftp command running in/root/web is uploaded to the server c: \ a only in the file linux under/root/web. Linux Tutorial: use ftp to automatically download uploaded files in Linux shell. use FTP to automatically log on to batch download files from/home/data on the ftp server 192.168.1.171 to The Local/home/databackup! /Bin/bashftp-v-n 192.168.1.171user guest 123456 binarycd/home/datalcd/home/databackuppromptmget * closebyeFTP automatically logs on to batch upload files from/home/data on the ftp server 192.168.1.171 to The Local /home/databackup #! /Bin/bashftp-v-n 192.168.1.171 <ENDuser guest 123456 binaryhashcd/home/datalcd/home/databackuppromptmput * byeEND
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.