CN104461563A - Method for remotely and regularly detecting newly added file of FTP server under linux - Google Patents
Method for remotely and regularly detecting newly added file of FTP server under linux Download PDFInfo
- Publication number
- CN104461563A CN104461563A CN201410813195.1A CN201410813195A CN104461563A CN 104461563 A CN104461563 A CN 104461563A CN 201410813195 A CN201410813195 A CN 201410813195A CN 104461563 A CN104461563 A CN 104461563A
- Authority
- CN
- China
- Prior art keywords
- file
- newly
- ftp server
- timing
- increased
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000012544 monitoring process Methods 0.000 claims description 27
- 230000004048 modification Effects 0.000 claims description 14
- 238000012986 modification Methods 0.000 claims description 14
- 238000012546 transfer Methods 0.000 claims description 14
- 230000006870 function Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000009471 action Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012559 user support system Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for remotely and regularly detecting a newly added file of an FTP server under linux. Compared with the prior art, the method for remotely and regularly detecting the newly added file of the FTP server under linux has the advantages that the API provided by the open-source FTPClient is used for calling the data in the FTP server, the adopted technology is simple and easy to operate, the newly added file under the appointed directory of the FTP server can be effectively monitored, the practicability is high, and the popularization is easy.
Description
Technical field
The present invention relates to ftp server art file management technology, specifically a kind of practical, under linux, remote timing detects ftp server and increases the method for file newly.
Background technology
Ftp server, be the computing machine providing storage space on the internet, they provide service according to File Transfer Protocol.The full name of FTP is File Transfer Protocol(file transfer protocol (FTP)).As its name suggests, be exactly be used for the agreement of transfer files specially.Briefly, the server of support File Transfer Protocol is exactly ftp server.
Serve the same with most of Internet, FTP is also a client/server system.User supports the client program of File Transfer Protocol by one, is connected to the ftp server program on distance host.User is given an order to server program by client program, and server program performs the order that user sends, and the result of execution is turned back to client computer.Such as user sends an order, require that server transmits the portion copy of some files to user, server can respond this order, is delivered on the machine of user by specified file.Client program representative of consumer receives this file, is left in User Catalog.FTPClient is a kind of third party's instrument for FTP of main flow, provides corresponding API(Application Programming Interface, application programming interface) program can send request instruction to ftp server.
Some robotization file processing platforms (the such as communications industry through subsystem) need to utilize ftp server as interface message processor (IMP), the file collected regularly to be sent to the downstream of workflow, and this just requires to monitor the fixing catalogue of ftp server.But, the client as FTPClient of current main flow all can not realize timing monitoring ftp server being increased newly to file, therefore, the timed task of a kind of api interface function of providing based on FTPClient and Linux is now provided, the method for file can be increased newly by remote timing monitoring ftp server.
Summary of the invention
Technical assignment of the present invention is for above weak point, provide a kind of practical, under linux, remote timing detects ftp server and increases the method for file newly.
Under linux, remote timing detects the method that ftp server increases file newly, the newly-increased file under the remote monitoring ftp server assigned catalogue of timing under linux operating system, and its specific implementation process is:
The timing monitoring and the data file that arrange connection ftp server download two modules, and wherein timing monitoring module is divided into the acquisition of newly-increased listed files and task start by set date two parts; Data file download module then adopts the multithreading of at least two-way to perform;
Ftp server starts, and the newly-increased listed files of timing monitoring module timing acquisition ftp server assigned catalogue, then by list notification data file download module being downloaded from ftp server by file by File Transfer Protocol multithreading of filename;
After timing monitoring module obtains newly-increased listed files, data file download module obtains newly-increased listed files, and the api interface function utilizing java programming language to call FTPClient for each file opening thread adopts File Transfer Protocol by transmitting data file in the storage of local computer.
Before described ftp server starts, further comprising the steps of: initialization local profile, write initial time; Configuration Linux timed task, arranges the executable program path that timing parameters and the acquisition FTP that will start increase the task of listed files newly.
The newly-increased listed files fetching portion of described monitoring module, the modification time that api interface that FTPClient provides obtains each file in ftp server assigned catalogue is called by java programming language, the time stored in the modification time of each file and local profile is compared, simultaneously file is after such time considered as newly-increased file, write by these newly-increased files in a newly-increased listed files, last notification data file download module is downloaded the file in listed files; Modification time up-to-date for each file in listed files is updated in local profile simultaneously.
The task start by set date part of described monitoring module, adopts the timed task order of Linux, increases the task of listed files fetching portion according to the startup of the time parameter timing of setting newly.
Of the present invention a kind of under linux remote timing detect ftp server and increase the method for file newly, have the following advantages:
This invention a kind of remote timing under linux detects the timer command initiating task that method that ftp server increases file newly directly utilizes Linux to carry, data in the API Calls ftp server adopting the FTPClient increased income to provide, the technology adopted simply easily operates, can newly-increased file under effective monitoring ftp server assigned catalogue, practical, be easy to promote.
Accompanying drawing explanation
Accompanying drawing 1 is system framework figure of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described.
The present invention propose a kind of under linux remote timing detect ftp server and increase the method for file newly, comprise the software frame realizing detecting, this framework is divided into timing monitoring and data file to download two modules.Timing monitoring module is responsible for the newly-increased listed files of timing acquisition FTP assigned catalogue, then by list notification data file download module being downloaded from ftp server by file by File Transfer Protocol multithreading of filename.The method is the newly-increased file under the remote monitoring ftp server assigned catalogue of timing under linux operating system, and its specific implementation process is:
The timing monitoring and the data file that arrange connection ftp server download two modules, and wherein timing monitoring module is divided into the acquisition of newly-increased listed files and task start by set date two parts; Data file download module then adopts the multithreading of at least two-way to perform;
Ftp server starts, and the newly-increased listed files of timing monitoring module timing acquisition ftp server assigned catalogue, then by list notification data file download module being downloaded from ftp server by file by File Transfer Protocol multithreading of filename;
After timing monitoring module obtains newly-increased listed files, data file download module obtains newly-increased listed files, and the api interface function utilizing java programming language to call FTPClient for each file opening thread adopts File Transfer Protocol by transmitting data file in the storage of local computer.
Before described ftp server starts, further comprising the steps of: initialization local profile, write initial time; Configuration Linux timed task, arranges the executable program path that timing parameters and the acquisition FTP that will start increase the task of listed files newly.
The newly-increased listed files fetching portion of described monitoring module, the modification time that api interface that FTPClient provides obtains each file in ftp server assigned catalogue is called by java programming language, the time stored in the modification time of each file and local profile is compared (in local profile, saving the up-to-date modification time obtaining newly-increased file last time), newly-increased file regarded as by file after this time, these newly-increased files are write in a newly-increased listed files, then notification data file download module is downloaded the file in listed files, modification time up-to-date for each file in listed files is updated in local profile simultaneously.
The task start by set date part of described monitoring module, have employed the timed task order of Linux, the task of listed files fetching portion can be increased newly according to the startup of the time parameter timing of setting, if time parameter arrange short, can be close to and real-time file is increased newly to ftp server assigned catalogue monitor.
With reference to accompanying drawing 1, its specific implementation process is:
1, before system starts, initialization local profile, writes initial time;
2, before system starts, configuration Linux timed task, arranges the executable program path that timing parameters and the acquisition FTP that will start increase the task of listed files newly;
3, start up system, task start by set date part in timing monitoring module can obtain according to the execution of the parameter timing arranged inside step 2 executable program that FTP increases listed files task newly, and the action that acquisition FTP increases listed files part newly refers to step 4;
4, after newly-increased listed files fetching portion is activated, the api interface that calling FTPClient provides obtains the modification time of each file in ftp server assigned catalogue, the time stored in the modification time of each file and local profile is compared (in local profile, saving the up-to-date modification time obtaining newly-increased file last time), newly-increased file regarded as by file after this time, write in a newly-increased listed files by these newly-increased files, then notification data file download module is downloaded the file in listed files; Modification time up-to-date for each file in listed files is updated in local profile simultaneously;
5, data file download module obtains newly-increased listed files, is that each file opening thread utilizes the api interface function calling FTPClient to adopt File Transfer Protocol by transmitting data file in the storage of local computer according to the number of list file.
Above-mentioned embodiment is only concrete case of the present invention; scope of patent protection of the present invention includes but not limited to above-mentioned embodiment; any according to the invention a kind of under linux remote timing detect that ftp server increases claims of the method for file newly and the those of ordinary skill of any described technical field to its suitable change done or replacement, all should fall into scope of patent protection of the present invention.
Claims (4)
1. under linux, remote timing detects the method that ftp server increases file newly, it is characterized in that, the newly-increased file under the remote monitoring ftp server assigned catalogue of timing under linux operating system, and its specific implementation process is:
The timing monitoring and the data file that arrange connection ftp server download two modules, and wherein timing monitoring module is divided into the acquisition of newly-increased listed files and task start by set date two parts; Data file download module then adopts the multithreading of at least two-way to perform;
Ftp server starts, and the newly-increased listed files of timing monitoring module timing acquisition ftp server assigned catalogue, then by list notification data file download module being downloaded from ftp server by file by File Transfer Protocol multithreading of filename;
After timing monitoring module obtains newly-increased listed files, data file download module obtains newly-increased listed files, and the api interface function utilizing java programming language to call FTPClient for each file opening thread adopts File Transfer Protocol by transmitting data file in the storage of local computer.
2. according to claim 1 a kind of under linux remote timing detect ftp server and increase the method for file newly, it is characterized in that, before described ftp server starts, further comprising the steps of: initialization local profile, write initial time; Configuration Linux timed task, arranges the executable program path that timing parameters and the acquisition FTP that will start increase the task of listed files newly.
3. according to claim 2 a kind of under linux remote timing detect ftp server and increase the method for file newly, it is characterized in that, the newly-increased listed files fetching portion of described monitoring module, the modification time that api interface that FTPClient provides obtains each file in ftp server assigned catalogue is called by java programming language, the time stored in the modification time of each file and local profile is compared, simultaneously file is after such time considered as newly-increased file, these newly-increased files are write in a newly-increased listed files, last notification data file download module is downloaded the file in listed files, modification time up-to-date for each file in listed files is updated in local profile simultaneously.
4. according to claim 2 a kind of under linux remote timing detect ftp server and increase the method for file newly, it is characterized in that, the task start by set date part of described monitoring module, adopt the timed task order of Linux, increase the task of listed files fetching portion according to the startup of the time parameter timing of setting newly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410813195.1A CN104461563A (en) | 2014-12-24 | 2014-12-24 | Method for remotely and regularly detecting newly added file of FTP server under linux |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410813195.1A CN104461563A (en) | 2014-12-24 | 2014-12-24 | Method for remotely and regularly detecting newly added file of FTP server under linux |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104461563A true CN104461563A (en) | 2015-03-25 |
Family
ID=52907674
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410813195.1A Pending CN104461563A (en) | 2014-12-24 | 2014-12-24 | Method for remotely and regularly detecting newly added file of FTP server under linux |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104461563A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105760281A (en) * | 2016-03-01 | 2016-07-13 | 浪潮软件集团有限公司 | Method for monitoring and analyzing performance data of Linux system server |
CN108205732A (en) * | 2017-12-26 | 2018-06-26 | 云南电网有限责任公司 | A kind of method of calibration of the new energy prediction data access based on file |
CN108259590A (en) * | 2018-01-10 | 2018-07-06 | 广州穗圣信息科技有限公司 | A kind of internet and LAN file intelligent synchronization method, apparatus and system |
CN111366829A (en) * | 2018-12-25 | 2020-07-03 | 海太半导体(无锡)有限公司 | Automatic downloading and managing system for test in semiconductor aging (TDBI) program |
CN111552673A (en) * | 2020-04-29 | 2020-08-18 | 咪咕文化科技有限公司 | File processing method and device, electronic equipment and storage medium |
CN112114567A (en) * | 2020-08-06 | 2020-12-22 | 江苏天和信息技术有限公司 | Information management system and method for casting unit |
CN112612811A (en) * | 2020-12-24 | 2021-04-06 | 航天信息股份有限公司 | Data import method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030056197A1 (en) * | 2001-08-30 | 2003-03-20 | Dennis Peter D. J. | Method and apparatus to facilitate debugging computer code within an operating system kernel |
CN1863050A (en) * | 2005-09-15 | 2006-11-15 | 上海华为技术有限公司 | Method of document synchronization between server and system thereof |
CN101635640A (en) * | 2009-09-04 | 2010-01-27 | 江苏天智互联科技有限公司 | Method for automatically releasing terminal program version of WEB network station system server |
CN102355497A (en) * | 2011-09-28 | 2012-02-15 | 中国铁道科学研究院电子计算技术研究所 | Data synchronization method |
-
2014
- 2014-12-24 CN CN201410813195.1A patent/CN104461563A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030056197A1 (en) * | 2001-08-30 | 2003-03-20 | Dennis Peter D. J. | Method and apparatus to facilitate debugging computer code within an operating system kernel |
CN1863050A (en) * | 2005-09-15 | 2006-11-15 | 上海华为技术有限公司 | Method of document synchronization between server and system thereof |
CN101635640A (en) * | 2009-09-04 | 2010-01-27 | 江苏天智互联科技有限公司 | Method for automatically releasing terminal program version of WEB network station system server |
CN102355497A (en) * | 2011-09-28 | 2012-02-15 | 中国铁道科学研究院电子计算技术研究所 | Data synchronization method |
Non-Patent Citations (1)
Title |
---|
唐志军 等: "Java多线程机制在FTP服务器程序中的应用", 《福建电脑》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105760281A (en) * | 2016-03-01 | 2016-07-13 | 浪潮软件集团有限公司 | Method for monitoring and analyzing performance data of Linux system server |
CN108205732A (en) * | 2017-12-26 | 2018-06-26 | 云南电网有限责任公司 | A kind of method of calibration of the new energy prediction data access based on file |
CN108259590A (en) * | 2018-01-10 | 2018-07-06 | 广州穗圣信息科技有限公司 | A kind of internet and LAN file intelligent synchronization method, apparatus and system |
CN111366829A (en) * | 2018-12-25 | 2020-07-03 | 海太半导体(无锡)有限公司 | Automatic downloading and managing system for test in semiconductor aging (TDBI) program |
CN111552673A (en) * | 2020-04-29 | 2020-08-18 | 咪咕文化科技有限公司 | File processing method and device, electronic equipment and storage medium |
CN112114567A (en) * | 2020-08-06 | 2020-12-22 | 江苏天和信息技术有限公司 | Information management system and method for casting unit |
CN112612811A (en) * | 2020-12-24 | 2021-04-06 | 航天信息股份有限公司 | Data import method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104461563A (en) | Method for remotely and regularly detecting newly added file of FTP server under linux | |
US10353728B2 (en) | Method, system and device for managing virtual machine software in cloud environment | |
US10491704B2 (en) | Automatic provisioning of cloud services | |
CN106648863B (en) | Android application installation package, application target process keep-alive method and system | |
US20190266011A1 (en) | Task processing method, apparatus, and system based on distributed system | |
CN101799751B (en) | Method for building monitoring agent software of host machine | |
WO2015192608A1 (en) | Method for updating app in android system, terminal and storage medium | |
US9645809B2 (en) | Updating software components through online stores | |
CN107291481B (en) | Component updating method, device and system | |
CN108241496B (en) | Smooth upgrading method and device for application program | |
CN104615466A (en) | Cloud platform deployment method and system | |
US20150039946A1 (en) | Method and system for a high availability framework | |
CN112118318B (en) | Vehicle upgrading method, terminal device, vehicle and computer storage medium | |
Huang | AppACTS: Mobile app automated compatibility testing service | |
CN104461628A (en) | Method and device for controlling updating of server programs | |
US20170033980A1 (en) | Agent manager for distributed transaction monitoring system | |
CN110647739A (en) | Software installation detection method, device, terminal and storage medium | |
CN103780428A (en) | Centralized resource management method and system applied to cloud architecture | |
CN109327530B (en) | Information processing method, device, electronic equipment and storage medium | |
CN109194742B (en) | Virtual machine console connection method and device and storage medium | |
CN106293790B (en) | application program upgrading method and device based on Firefox operating system | |
CN104915593A (en) | Binding removing processing method and system for software | |
CN105653298A (en) | Application program update method and terminal | |
CN111198753A (en) | Task scheduling method and device | |
JP5359835B2 (en) | Information processing apparatus, distribution system, and reception method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150325 |
|
WD01 | Invention patent application deemed withdrawn after publication |