In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Editor to share with you how to use Shell scripts under Linux to achieve automatic upload and download of ftp. I hope you will get something after reading this article. Let's discuss it together.
1. Ftp automatically logs in to download files in bulk.
The code is as follows:
# from / home/data on ftp server to local / home/databackup####
#! / bin/bash
Ftp-N2. Ftp automatically logs in to upload files.
The code is as follows:
# / home/data#### on the local / home/databackup to ftp server
#! / bin/bash
Ftp-n3. Ftp automatically logs in to download a single file.
The code is as follows:
# download / home/data/a.sh to local / home/databackup#### from ftp server
#! / bin/bash
Ftp-N4. Ftp automatically logs in to upload a single file.
The code is as follows:
# put the local / home/databachup/a.sh up ftp / home/databackup under #
#! / bin/bash
Summary of ftp-n: by saving the above script as a file and adding it to crontab, ftp can automatically upload and download files.
Notes:
1.-n is not affected by .netrc files. (ftp defaults to reading settings in .netrc files)
two。
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.