Archive for March, 2014

Linux, SSH command file upload using FTP to another FTP space

If there is no ftp prompt: -bash: ftp: command not found
Please install ftp application: yum install ftp
#ftp 127.0.0.1 21 Enter the remote space FTP IP and port number,Enter
Then follow the prompts to enter a user name and password!
ftp>lcd local working directory
ftp>cd remote directory
ftp>binary binary transmission
ftp> Byte counter tick the open transmission,Execute it again to close
ftp>mput file

FTP> bye (or by) the end and the remote computer linux ftp command parameters in linux in the ftp session and exit the command parameters。

FTP> cd change working directory on the remote computer。

FTP> get to use the current document conversion type remote document copy to the local computer。
format:get remote-file [local-file]

FTP >lcd change local working directory on your computer。by default,Working directory is the starting directory linux in the ftp command parameters。

format:lcd [directory]

FTP >ls display the remote directory files and subdirectories of the abbreviations list。

FTP >mdelete delete a document on the remote computer。
format:mdelete remote-files [ …]
Explanation:remote-files specified to delete the remote document。

FTP >mdir display a list of remote directory files and subdirectories。It can be used to specify multiple documents mdir。
format:mdir remote-files [ …] local-file
Explanation:remote-files you want to view a list of directories。必须指定 remote-files。Type - the current working directory on the remote computer。

1、Ftp server connection

format:ftp [hostname | ip-address]
a)Enter the command line in linux:ftp www.boluo.org
b)Ask your server user name and password,Enter the appropriate user name and password,It can be authenticated by。

2、download file

Download files usually get and mget two commands:

a) get format:get [remote-file] [local-file]
Transfer files from a remote host to the local host.
To get on the server /ftp/1.rar,then
ftp> get /ftp/1.rar 1.rar (Enter)

b) mget format:mget [remote-files]
A number of documents received from the remote host to the local host.
To get all the files on the server / ftp under,then
ftp> cd / ftp
ftp> mget *.* (Enter)

note:Files are downloaded to the current directory under linux host。

3、upload files

a) put format:put local-file [remote-file]
To transfer a local file to the remote host.
Should you local 1.zip sent to the remote host / ftp,And renamed 1.rar
ftp> put 1.zip /ftp1.rar (Enter)

b) mput format:mput local-files
Transferring a number of local host file to the remote host.
Should you local current directory rar files uploaded to the server / ftp under
ftp> cd / ftp (carriage return)
ftp> mput * .rar (Enter)

4、Disconnect

bye:Disconnected from the server。

Comments