Linux basic commands --- mput ftp upload files

mput

After using lftp ftp server login, you can use the put command to upload files to the server. mput commands can use wildcards, and can not put the instruction.

 

1 , grammar

mput [-c]  [-d] [-a]  [-E]  [-O base]  files

 

2 , the list of options

Options

Explanation

-d

Wear a file with the same name as the directory, file storage

-c

If it fails, continued access

-E

After the acquisition, delete the source files

-a

Use ascii mode

-O

Specify the output file storage directory

 

3 , examples

upload files

[root@localhost weijie]# lftp 192.168.1.8            //登录服务器

lftp 192.168.1.8:~> cd pub/                             //切换工作目录

lftp 192.168.1.8:/pub> mput *.c                        //上传所有c文件

mput: Access failed: 553 Could not create file. (3.c)

155 bytes transferred

Transfer of 1 of 4 files failed

lftp 192.168.1.8:/pub> ls                               //查看内容,以上传成功

-rwxrwxrwx    1 0       0        2375494044 Aug 14 06:38 1.zip

-rw-------    1 14      50              0 Oct 02 01:52 11.c

-rw-r--r--    1 0       0               0 Oct 02 01:19 11c

-rw-r--r--    1 0       0               0 Oct 02 01:19 22c

-rw-------    1 14      50             65 Oct 02 01:48 3.c

-rw-------    1 14      50             52 Oct 02 01:52 4.c

-rw-------    1 14      50             38 Oct 02 01:52 5.c

drwxr-xr-x    2 0        0            4096 Oct 02 01:12 testftp 

     

Made a study of the Linux platform, now came up with a prototype, you can use the reference
link: https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ   Password: n7bk

081634m8n8t2tmz2te95w5.gif


Guess you like

Origin blog.51cto.com/9888479/2400471