CN109271167A - A kind of document transmission method and device - Google Patents
A kind of document transmission method and device Download PDFInfo
- Publication number
- CN109271167A CN109271167A CN201811167043.3A CN201811167043A CN109271167A CN 109271167 A CN109271167 A CN 109271167A CN 201811167043 A CN201811167043 A CN 201811167043A CN 109271167 A CN109271167 A CN 109271167A
- Authority
- CN
- China
- Prior art keywords
- file
- change
- information
- change file
- temporary
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/45—Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
- G06F8/457—Communication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application discloses a kind of document transmission method and devices;Above-mentioned document transmission method, comprising: the information of the change file in coding exploitation is virtualized by git command recognition;Create the information that temporary file saves change file;According to the information of the change file saved in temporary file, change file is transferred to by long-range purpose system by scp order.The application, which can be realized, rapidly and efficiently transmits change file.
Description
Technical field
This application involves but be not limited to field of computer technology, espespecially a kind of document transmission method and device.
Background technique
When software developer carries out virtualization coding exploitation, the code transfer that will have just write is generally required to remote machine
The validation verification or loophole (bug) of (virtual machine) enterprising line code repair verifying.However, these files just changed can
It can be distributed under the different directories of project.Traditional approach is that (file based on windows platform transmits soft by Xftp software
Part) it clicks under local folders one by one manually, under the respective directories for then finding remote machine, manually identifies and just become one by one
Local file more is clicked manually and carries out file transmission.And when the file of change is not under the same catalogue, then it needs at this
Change file catalogue simultaneously in ground file system and Telefile, finds and carries out file transmission after corresponding catalogue.By
This affects the exploitation mood of software developer, limits the work of software developer as it can be seen that aforesaid way is bothersome laborious
Efficiency.
Summary of the invention
The embodiment of the present application provides a kind of document transmission method and device, can be realized rapidly and efficiently transmission change text
Part.
On the one hand, the embodiment of the present application provides a kind of document transmission method, comprising: is virtualized and is compiled by git command recognition
The information of change file in code exploitation;Creation temporary file saves the information of the change file;According to the temporary file
The change file is transferred to long-range purpose system by scp order by the information of the change file of middle preservation.
On the other hand, the embodiment of the present application provides a kind of file transfer means, comprising: identification module is suitable for ordering by git
Enable the information of the change file in identification virtualization coding exploitation;Memory module is suitable for creation temporary file and saves the change
The information of file;Transmission module is ordered suitable for the information according to the change file saved in the temporary file by scp
It enables and the change file is transferred to long-range purpose system.
In another aspect, the embodiment of the present application provides a kind of terminal, comprising: memory and processor;The memory storage
The step of file-transfer program, the file-transfer program realizes above-mentioned document transmission method when being executed by the processor.
In addition, the embodiment of the present application also provides a kind of computer-readable medium, it is stored with file-transfer program, the file
The step of above-mentioned document transmission method is realized when transfer program is executed by processor.
In the embodiment of the present application, the mode combined by using git order and scp order, automatic identification change file,
And realize the remote transmission of change file, to guarantee to identify that the accuracy of change file and rapidly and efficiently transmission change are literary
Part reduces the redundancy of effort of developer.
Other features and advantage will illustrate in the following description, also, partly become from specification
It obtains it is clear that being understood and implementing the application.The purpose of the application and other advantages can be by specifications, right
Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
Attached drawing is used to provide to further understand technical scheme, and constitutes part of specification, with this
The embodiment of application is used to explain the technical solution of the application together, does not constitute the limitation to technical scheme.
Fig. 1 is the flow chart of document transmission method provided by the embodiments of the present application;
Fig. 2 is the exemplary diagram of document transmission method provided by the embodiments of the present application;
Fig. 3 is the schematic diagram of file transfer means provided by the embodiments of the present application;
Fig. 4 is the schematic diagram of terminal provided by the embodiments of the present application.
Specific embodiment
Embodiments herein is described in detail below in conjunction with attached drawing.It should be noted that in the feelings not conflicted
Under condition, the features in the embodiments and the embodiments of the present application can mutual any combination.
Step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions
It executes.Also, although logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable
Sequence executes shown or described step.
Fig. 1 is the flow chart of document transmission method provided by the embodiments of the present application.File transmission side provided in this embodiment
The change file that method is used to carry out software developer to generate in virtualization coding development process is quickly and efficiently transmitted to far
Journey purpose system (virtual machine).
As shown in Figure 1, document transmission method provided in this embodiment, comprising the following steps:
Step 101 virtualizes the information for encoding the change file in exploitation by git command recognition;
Step 102, creation temporary file save the information of change file;
Step 103, according to the information of the change file saved in temporary file, change file is transmitted by scp order
To long-range purpose system.
Wherein, git is that Linus Torvalds is developed and an open source code of exploitation to help to manage linux kernel
Version Control software.Scp (secure copy) order is a kind of linux file management command, is copied for realizing telefile
Shellfish.
In the present embodiment, after code can be submitted from last time to code storage with identification software developer by git order
Change file information.Illustratively, the information of change file may include the file path and title of change file, such as
Format is as follows: path/subPath/fileName.
In an illustrative embodiments, step 102 may include: creation temporary file, with behavior in temporary file
The file path and title for the change file that unit storage identifies.
In this illustrative embodiment, with the information of behavior unit storage change file in temporary file, it can be convenient
Subsequent read operation.
In an illustrative embodiments, step 103 may include: to read change file from temporary file with behavior unit
File path and title;The change file read by scp order circle transmission is to long-range purpose system.
In the present embodiment, a row information is read from temporary file every time, can all use scp order by the row information pair
The change file answered is transferred to long-range purpose system;Circulation executes row read operation and remote transmission operation, until temporary file
In information all read finish.The remote transmission of change file is realized by scp order, can be real by scp order
The now transmission of respective directories of the local change file to long-range purpose system, to cover the text of the same name in long-range purpose system
Part achievees the purpose that the file of the same name for updating remote system.
In an illustrative embodiments, after step 103, the document transmission method of the present embodiment can also include:
Delete temporary file.
Document transmission method provided in this embodiment is realized certainly by using the mode that git order and scp order combine
The remote transmission of change file and change file of the dynamic identification developer in virtualization coding exploitation, to get rid of numerous
The miscellaneous work for manually identifying, transmitting file, guarantees the accuracy of identification change file, reduces the redundancy work of developer
Make, research and development cost is greatly lowered.
Fig. 2 is the example flow diagram of document transmission method provided by the embodiments of the present application.As shown in Fig. 2, the present embodiment mentions
The document transmission method of confession, comprising the following steps:
Step 201 virtualizes the information for encoding the change file in exploitation by git command recognition;
This step is realized by git diff order, which can show the submission code from last time to code storage
The information of change file afterwards, the information of the change file may include the file path of change file (the file mesh where i.e.
Record) and title, for example format is as follows: path/subPath/fileName.
Step 202, creation temporary file save the information of change file;
The main task of this step is one temporary file (for example, text document) of creation, the file that step 201 is obtained
Path and title are stored with behavior unit, to facilitate later read operation.Illustratively, pass through the defeated of change file
Order can create a temporary file out, in conjunction with the order in step 201, can indicate are as follows: git diff-name-
only>diff.tem.Thus the information of the change file obtained by git diff order can be written to temporary file
In diff.tem.
Change file is transferred to long-range purpose system by scp order by step 203;
The main task of this step is the change file telecopy that will record in diff.tem into long-range purpose system.
For example, cat diff.tem can be passed through | while read line order, in behavior unit output diff.tem file
Hold;Then, file name is recycled, is operated in circulation by the transmission that scp order changes file every time;Pass through reading
The information of the change file of every row storage in diff.tem file, then be transferred to corresponding change file far by scp order
Journey purpose system.All change files recorded in diff.tem can thus be copied one by one to the phase of long-range purpose system
It answers under catalogue.Mode through this embodiment carries out file transmission, although will appear duplication of name file in long-range purpose system
Default will not prompt, and not need the confirmation that developer is made whether covering duplication of name file again.
Step 204 deletes temporary file;
After having carried out operation of the step 201 to step 203, the change file stored in diff.tem is had been transferred to
In long-range purpose system, the content in temporary file has not had value, when developer carries out exploitation coding again, again
New change file can be generated, therefore temporary file can be deleted after being transmitted, for example, can use rm-f
Diff.tem is deleted in diff.tem order.
In an illustrative embodiments, the above code can be written in a transFlies.sh file that (.sh is
The script of suffix), when developer changes multiple texts (when there is multiple change files), it is only necessary to run
TransFiles.sh script, so that it may realize that all change files are automatically transferred in long-range purpose system, to improve text
Part efficiency of transmission, and manually locating file catalogue, the mode of manual replacement change file are got rid of, it substantially increases out
Efficiency is sent out, research and development cost is reduced.
The present embodiment is based on git diff order and scp file transmitting function, realizes remote transmission change file;Not only make
Identification change file, transmission change file realize automation, greatly improve file transmission efficiency, reduce research and develop at
This;Moreover, avoiding manual identified, the cumbersome and error rate of manual transmission by command recognition change file, identifying file
Lower error rate is zero.
Fig. 3 is the schematic diagram of file transfer means provided by the embodiments of the present application.As shown in figure 3, provided in this embodiment
File transfer means, comprising: identification module 301, memory module 302 and transmission module 303;Wherein, identification module 301 are fitted
In the information by the change file in the virtualization coding exploitation of git command recognition;Memory module 302 is suitable for the interim text of creation
The information of part preservation change file;Transmission module 303 passes through suitable for the information according to the change file saved in temporary file
Change file is transferred to long-range purpose system by scp order.
In an illustrative embodiments, the information of change file may include: the file path and title of change file.
In an illustrative embodiments, memory module 302 may be adapted to create temporary file preservation in the following manner
The information of change file: creation temporary file, the file of the change file identified in temporary file with behavior unit storage
Path and title.
In an illustrative embodiments, transmission module 303 may be adapted to protect according in temporary file in the following manner
Change file is transferred to long-range purpose system by scp order by the information for the change file deposited: with behavior unit from interim text
The file path and title of part reading change file;The change file read by scp order circle transmission is to long-range purpose system
System.
In an illustrative embodiments, file transfer means can also include: removing module, be suitable in transmission module
After change file is transferred to long-range purpose system by 303, temporary file is deleted.
Related description about file transfer means provided in this embodiment is referred to the description of above method embodiment,
Therefore it is repeated no more in this.
Fig. 4 is the schematic diagram of terminal provided by the embodiments of the present application.As shown in figure 4, the embodiment of the present application provides a kind of end
Hold 400 (for example, desktop computer or notebook computers etc.), comprising: memory 401 and processor 402, memory 401 are suitable for depositing
File-transfer program is stored up, this document transfer program realizes file transmission side provided by the above embodiment when being executed by processor 402
The step of method, such as step shown in fig. 1 or fig. 2.It will be understood by those skilled in the art that structure shown in Fig. 4, only
The schematic diagram of part-structure relevant to application scheme does not constitute the terminal 400 being applied thereon to application scheme
Restriction, terminal 400 may include perhaps combining certain components than more or fewer components as shown in the figure or having not
Same component layout.
Wherein, processor 402 can include but is not limited to microprocessor (MCU, Microcontroller Unit) or can
The processing unit of programmed logic device (FPGA, Field Programmable Gate Array) etc..Memory 401 can be used for
The software program and module for storing application software, such as the corresponding program instruction of document transmission method or mould in the present embodiment
Block, the software program and module that processor 402 is stored in memory 401 by operation, thereby executing various function application
And data processing, for example realize document transmission method provided in this embodiment.Memory 401 may include high speed random storage
Device may also include nonvolatile memory, such as one or more magnetic storage device, flash memory or other are non-volatile solid
State memory.In some instances, memory 401 may include the memory remotely located relative to processor 402, these are long-range
Memory can pass through network connection to terminal 400.The example of above-mentioned network include but is not limited to internet, intranet,
Local area network, mobile radio communication and combinations thereof.
In addition, the embodiment of the present application also provides a kind of computer-readable medium, it is stored with file-transfer program, this document passes
The step of defeated program realizes document transmission method provided by the above embodiment when being executed by processor, for example, shown in Fig. 1 or Fig. 2
The step of.
It will appreciated by the skilled person that whole or certain steps, system, dress in method disclosed hereinabove
Functional module/unit in setting may be implemented as software, firmware, hardware and its combination appropriate.In hardware embodiment,
Division between the functional module/unit referred in the above description not necessarily corresponds to the division of physical assemblies;For example, one
Physical assemblies can have multiple functions or a function or step and can be executed by several physical assemblies cooperations.Certain groups
Part or all components may be implemented as by processor, such as the software that digital signal processor or microprocessor execute, or by
It is embodied as hardware, or is implemented as integrated circuit, such as specific integrated circuit.Such software can be distributed in computer-readable
On medium, computer-readable medium may include computer storage medium (or non-transitory medium) and communication media (or temporarily
Property medium).As known to a person of ordinary skill in the art, term computer storage medium is included in for storing information (such as
Computer readable instructions, data structure, program module or other data) any method or technique in the volatibility implemented and non-
Volatibility, removable and nonremovable medium.Computer storage medium include but is not limited to RAM, ROM, EEPROM, flash memory or its
His memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storages, magnetic holder, tape, disk storage or other
Magnetic memory apparatus or any other medium that can be used for storing desired information and can be accessed by a computer.This
Outside, known to a person of ordinary skill in the art to be, communication media generally comprises computer readable instructions, data structure, program mould
Other data in the modulated data signal of block or such as carrier wave or other transmission mechanisms etc, and may include any information
Delivery media.
The advantages of basic principles and main features and the application of the application have been shown and described above.The application is not by upper
The limitation for stating embodiment, the above embodiments and description only describe the principles of the application, are not departing from the application
Under the premise of spirit and scope, the application be will also have various changes and improvements, these changes and improvements both fall within claimed
Within the scope of the application.
Claims (10)
1. a kind of document transmission method characterized by comprising
The information of the change file in coding exploitation is virtualized by git command recognition;
Creation temporary file saves the information of the change file;
According to the information of the change file saved in the temporary file, the change file is transmitted by scp order
To long-range purpose system.
2. the method according to claim 1, wherein the information of the change file includes: the change file
File path and title.
3. according to the method described in claim 2, it is characterized in that, the creation temporary file saves the letter of the change file
Breath, comprising:
Create temporary file, the file path of the change file identified in the temporary file with behavior unit storage
And title.
4. according to the method described in claim 3, it is characterized in that, described according to the change saved in the temporary file
The change file is transferred to long-range purpose system by scp order by the information of file, comprising:
The file path and title of the change file are read from the temporary file with behavior unit;
The change file read by scp order circle transmission is to the long-range purpose system.
5. the method according to claim 1, wherein described be transferred to the change file by scp order
After long-range purpose system, the method also includes: delete the temporary file.
6. a kind of file transfer means characterized by comprising
Identification module, suitable for the information by the change file in the virtualization coding exploitation of git command recognition;
Memory module saves the information of the change file suitable for creating temporary file;
Transmission module will be described by scp order suitable for the information according to the change file saved in the temporary file
Change file is transferred to long-range purpose system.
7. device according to claim 6, which is characterized in that the information of the change file includes: the change file
File path and title.
8. device according to claim 7, which is characterized in that it is interim that the memory module is suitable for creation in the following manner
File saves the information of the change file: creation temporary file is identified in the temporary file with behavior unit storage
The change file file path and title.
9. a kind of terminal characterized by comprising memory and processor;The memory storage file transfer program, it is described
Realizing the document transmission method as described in any one of claims 1 to 5 when file-transfer program is executed by the processor
Step.
10. a kind of computer-readable medium, which is characterized in that be stored with file-transfer program, the file-transfer program is located
Manage the step of realizing the document transmission method as described in any one of claims 1 to 5 when device executes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811167043.3A CN109271167A (en) | 2018-10-08 | 2018-10-08 | A kind of document transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811167043.3A CN109271167A (en) | 2018-10-08 | 2018-10-08 | A kind of document transmission method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109271167A true CN109271167A (en) | 2019-01-25 |
Family
ID=65195796
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811167043.3A Pending CN109271167A (en) | 2018-10-08 | 2018-10-08 | A kind of document transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109271167A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105474206A (en) * | 2013-07-25 | 2016-04-06 | 微软技术许可有限责任公司 | Virtual synchronization with on-demand data delivery |
CN106331182A (en) * | 2016-11-11 | 2017-01-11 | 山东大学 | File synchronization method based on desktop virtualization |
CN107608760A (en) * | 2017-09-14 | 2018-01-19 | 郑州云海信息技术有限公司 | A kind of kvm virtual machine deployment methods, system and computer-readable recording medium |
-
2018
- 2018-10-08 CN CN201811167043.3A patent/CN109271167A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105474206A (en) * | 2013-07-25 | 2016-04-06 | 微软技术许可有限责任公司 | Virtual synchronization with on-demand data delivery |
CN106331182A (en) * | 2016-11-11 | 2017-01-11 | 山东大学 | File synchronization method based on desktop virtualization |
CN107608760A (en) * | 2017-09-14 | 2018-01-19 | 郑州云海信息技术有限公司 | A kind of kvm virtual machine deployment methods, system and computer-readable recording medium |
Non-Patent Citations (2)
Title |
---|
TIM’S BLOG: ""基于Git的文件自动同步的思考和实现"", 《WUZHIWEI.NET/FILE_SYNC_GIT/》 * |
张映: ""ssh批量上传文件"", 《HTTP://BLOG.51YIP.COM/LINUX/1356.HTML》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11741046B2 (en) | Method and apparatus for creating system disk snapshot of virtual machine | |
US9459967B2 (en) | Cascade ordering | |
US10108501B2 (en) | Terminal backup and recovery method | |
US8639973B2 (en) | System reset | |
US8984027B1 (en) | Systems and methods for migrating files to tiered storage systems | |
US20180025023A1 (en) | Dynamically synching elements in file | |
US8095510B2 (en) | Data restoration in a storage system using multiple restore points | |
CN105144088A (en) | Association of metadata with source code and applications and services premised thereon | |
US20170139813A1 (en) | Method and device for checking influence of deleting cache file, and mobile terminal | |
KR20170133120A (en) | System and mehtod for managing container image | |
US10346150B2 (en) | Computerized system and method for patching an application by separating executables and working data using different images | |
US9087014B1 (en) | Tape backup and restore in a disk storage environment | |
US9235588B1 (en) | Systems and methods for protecting deduplicated data | |
US10114579B2 (en) | Data migration tool with intermediate incremental copies | |
US9582209B2 (en) | Efficient data deployment for a parallel data processing system | |
KR101624005B1 (en) | Controlling access to software component state | |
US20160203203A1 (en) | Metadata peering with improved inodes | |
US9442719B2 (en) | Regression alerts | |
CN111984666A (en) | Database access method and device, computer readable storage medium and computer equipment | |
CN102402598B (en) | Application file system access | |
US11500835B2 (en) | Cohort management for version updates in data deduplication | |
CN109271167A (en) | A kind of document transmission method and device | |
US20160203153A1 (en) | Computing device and cloud storage method of the computing device | |
CN109144948B (en) | Application file positioning method and device, electronic equipment and memory | |
US11630742B2 (en) | System and method of performing recovery using a backup image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190125 |