In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
FTP connection method and configuration is how, 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 gain something.
Connect remotely using the FTP upload tool
FTP is used to upload and download files between FTP servers and FTP clients, and its best feature is batch management, which can transfer files from one host to another.
Address: FTP upload tool
The best feature of using FTP upload tool is batch management and batch upload, which is suitable for Windows system, Linux system and CVM, which can greatly improve the work efficiency of webmaster and server operation and maintenance personnel. At the same time, FTP upload tool is also a vnc client, which really realizes one-stop management, which is very convenient.
Configure connection FTP under java:
Public void putTxtToFTP () {System.out.println ("start timer task: maintain an one-click order!") ; Calendar calendar = Calendar.getInstance (); calendar.add (Calendar.DATE,-1); / / get the previous day Date date = calendar.getTime (); SimpleDateFormat df = new SimpleDateFormat ("yyyyMMdd"); String yesterday = df.format (date); StringBuffer yjtjOrderTxt = new StringBuffer (); yjtjOrderTxt.append ("yjtywx_") .append (yesterday) .append (".txt") List yjtjOrderList = activeDataService.wxGetYjtjOrder (); / / FtpUtil ftpUtil = new FtpUtil ("hexin", "hx105155", "134.64.105.155", "/ yjtydd"); / / Test Library FTP FtpUtil ftpUtil = new FtpUtil ("ahftp", "ahdx@#$_123dic", "192.168.0.28", "/ yjtydd"); PrintWriter printWriter = null; File highFeeFile = new File (Contants.FILE_PATH_BAK + yjtjOrderTxt) / / Contants.FILE_PATH_BAK = "/ opt/wss/domains/tmp/" / / File highFeeFile = new File ("opt/wss/domains/tmp/ /" + highFeeTxt); / / File gjmyFile = new File ("DRV /" + gjmyTxt); / / File highFeeFile = new File ("DRV /" + yjtjOrderTxt); try {printWriter = new PrintWriter (new FileWriter (highFeeFile, true)); for (int I = 0; I < yjtjOrderList.size ()) PrintWriter.println (yjtjOrderList.get (I). ToString (). Trim ());} catch (IOException e) {System.out.println ("active service high data report task exception!") ;} finally {printWriter.close ();} if (highFeeFile.exists ()) {System.out.println ("active service timer task high data uploaded successfully" + yjtjOrderTxt.toString ()); ftpUtil.uploadFile (highFeeFile, yjtjOrderTxt.toString ()) } else {System.out.println ("active service timer task high data upload failed" + yjtjOrderTxt.toString ());} System.out.println ("Server batch search rankings-query results");} public ActiveDataService getActiveDataService () {return activeDataService;} public void setActiveDataService (ActiveDataService activeDataService) {this.activeDataService = activeDataService } 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.