Linux under FTP command __linux

Source: Internet
Author: User
Tags ftp site

FTP command using sample
-bash-3.00$ FTP Site(connect another host)
Connected to Site (139.185.21.141).
1.2.1 (VSFTPD)
Name (site:app7740): xxxxx
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
Ftp> ls
Entering passive Mode (139,185,21,141,216,189)
Here comes the directory listing.
-rw-r--r--1 60202384 60402384 524 Aug-00:37 temp1.out

Directory send OK.
ftp> pwd(FTP command can also perform ordinary Linux commands, PWD,LS,CD ...) )
257 "/slot/ems2384/appmgr"
ftp> ls temp1*
Entering passive Mode (139,185,21,141,178,113)
Here comes the directory listing.
-rw-r--r--1 60202384 60402384 524 Aug-00:37 temp1.out
Directory send OK.
Ftp> Get Temp1.out(download files from another host to the local)
Local:temp1.out Remote:temp1.out
Entering passive Mode (139,185,21,141,126,148)
Opening BINARY mode data connection for Temp1.out (524 bytes).
The File send OK.
524 Bytes received in 0.0017 secs (3e+02 kbytes/sec)
Ftp> put INVLTENT.PLX_BK(upload files from this machine to another host)
LOCAL:INVLTENT.PLX_BK REMOTE:INVLTENT.PLX_BK
Entering passive Mode (139,185,21,141,109,145)
File:invltent.plx_bk.1
The File receive OK.
331776 Bytes Sent in 0.00457 secs (7.1e+04 kbytes/sec)
Ftp> bye(exit)
221 Goodbye.


Detailed Instructions

1. Connecting to an FTP server
Format: FTP [hostname| ip-address]
A) on the Linux command line, enter: FTP 10.18.34.115
b The server asks you username and password, enter yint and corresponding password respectively, wait for authentication to pass.

2. Download the file
The download file usually uses the get and mget two commands.
a) Get
Format: Get [Remote-file] [Local-file]
Transfers files from the remote host to the local host.
To get E:\rose\1.bmp on the server,
ftp> get/rose/1.bmp 1.bmp (carriage return)
b) mget
Format: mget [Remote-files]
Receives a batch of files from the remote host to the local host.
To get all the files under E:\rose\ on the server,
Ftp> Cd/rose
ftp> mget *.* (carriage return)
Note: The files are downloaded to the Linux host's current directory. For example, the FTP command that runs under/root/yint, the files are downloaded to the/root/yint.

3. Upload file
a) put
Format: Put Local-file [Remote-file]
Transfers a local file to the remote host.
If you want to transfer the local 1.bmp to the remote host E:\rose, and renamed to 333.bmp
Ftp> put 1.bmp/rose/333.bmp (carriage return)
b) mput
Format: Mput local-files
Transfers a batch of files from a local host to a remote host.
If you want to upload all BMP files in the local current directory to the server E:\rose
Ftp> cd/rose (carriage return)
ftp> mput *.bmp (carriage return)
Note: The upload files are from the host's current directory. For example, the FTP command that runs under the/root/yint, only the file Linux under/root/yint will be uploaded to the server E:\rose.

4. Disconnect the connection
Bye: Interrupts the connection to the server.
Ftp> Bye (carriage return)

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.