FTP commands in Linux

Source: Internet
Author: User
Tags ftp commands


Use the FTP command in Linux to use Sample-bash-3.00 $ ftp rws60001rems.us.oracle.com (connect to another host) Connected to rws60001rems.us.oracle.com (139.185.21.141 ). 220 (vsFTPd 1.2.1) Name (rws60001rems.us.oracle.com: app7740): xxxxx331 Please specify the password. password: www.2cto.com 230 Login successful. remote system type is UNIX. using binary mode to transfer files. ftp> ls227 Entering Passive Mode (139,185, 21,141,216,189) 150 H Ere comes the directory listing. -rw-r -- 1 60202384 60402384 524 Aug 08 temp1.out 226 Directory send OK. ftp> pwd (the ftp command can also execute common linux commands, pwd, ls, cd ...) 257 "/slot/ems2384/appmgr" ftp> ls temp1 * 227 Entering Passive Mode (139,185, 21,141,178,113) 150 Here comes the directory listing. -rw-r -- 1 60202384 60402384 524 Aug 08 temp1.out226 Directory send OK. www.2cto.com ftp> get temp1.out (from another master Local: temp1.out remote: temp1.out227 Entering Passive Mode (139,185, 21,141,126,148) 150 Opening BINARY mode data connection for temp1.out (524 bytes ). 226 File send OK .524 bytes encoded ed in 0.0017 secs (3e + 02 Kbytes/sec) ftp> put INVLTENT. plx_bk (upload files from the local machine to another host) local: INVLTENT. plx_bk remote: INVLTENT. plx_bk227 Entering Passive Mode (139,185, 21,141,109,145) 150 FILE: INVLTENT. plx_bk.1226 File Receive OK .331776 bytes sent in 0.00457 secs (7.1e + 04 Kbytes/sec) ftp> bye (exit) 221 Goodbye. command details 1. format of connecting to the ftp server: ftp [hostname | ip-address] a) Enter ftp 10.18.34.115b in the linux Command Line. The server will ask you for your username and password, and enter the yint and password respectively, to be authenticated. 2. The get and mget commands are usually used to download files. A) get www.2cto.com: get [remote-file] [local-file] transfers files from the remote host to the local host. to obtain E: \ rose \ 1.bmp on the server, ftp> get/rose/1.bmp 1.bmp (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: \ rose \ on the server, ftp> cd/roseftp> mget *. * (Press ENTER) Note: All files are downloaded to the current directory of the linux host. For example, if you run the ftp command in/root/yint, all files are downloaded to/root/yint. 3. upload file a) put format: put local-file transfer to remote host E: \ rose, and renamed to 333.bmp ftp> put 1.bmp/rose/333.bmp (Press ENTER) B) mput www.2cto.com format: mput local-files transfers 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> cd/rose (Press ENTER) ftp> mput * on the server E: \ rose *. bmp (Press ENTER) Note: All uploaded files are from the current directory of the host. For example, if you run the ftp command in/root/yint, it will be uploaded to the server E: \ rose only in the file linux under/root/yint. 4. Disconnect bye: the connection to the server is interrupted. Ftp> bye (Press ENTER) by pan_tian

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.