In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Linux how to use the get command to get ftp files, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.
Get
After logging in to the ftp server using lftp, you can use the get directive to get the file from the server.
1. Grammar
Get [- E] [- a] [- c] [- O base] rfile [- o lfile]
2. List of options
Option
Description
-o
Specify the name of the output file. If not specified, the original name will be used.
-c
If it fails, continue to get
-E
After getting it, delete the source file
-a
Use ascii mode
-O
Specify the directory where the output files are stored
3. Examples
1) get the file and specify the name of the storage
[root@localhost weijie] # lftp 192.168.1.8 / / Log in to the ftp server
Lftp 192.168.1.8 ~ > ls
Drwxr-xr-x 2 0 0 4096 Aug 14 06:38 pub
Lftp 192.168.1.8 lftp / > cd pub/ switch directories
Lftp 192.168.1.8:/pub > ls / / View files
-rwxrwxrwx 1 0 2375494044 Aug 14 06:38 1.zip
-rw-r--r-- 1 000 Aug 14 03:38 test.c
Lftp 192.168.1.8:/pub > get test.c-o testtt.c / / get the file, which is stored as testtt.c
Lftp 192.168.1.8:/pub > quit / / exit
[root@localhost weijie] # ls / / View the content and get the file. Files are stored in the current directory
1 11.c 1.zip 2.c.bz2 4.c 6.c ~ rec000012.c.bz2 testtt.c
1. 1.c 2.c 3.c 5.c col res.zip
2) get the file and specify the storage location
[root@localhost weijie] # lftp 192.168.1.8 / / Log into the server
Lftp 192.168.1.8 ~ > cd pub/ switch directories
Lftp 192.168.1.8:/pub > get-O / test.c / / get the file and specify the storage location to the root directory
Lftp 192.168.1.8:/pub > quit / / exit
[root@localhost weijie] # ls / / check the change directory and get the file
Bak dev lib misc opt sbin sys usr wj
Bin etc lost+found mnt proc selinux test.c var
Boot home media net root srv tmp weijie
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.