CN106599223A - Method for recording accessed record of file - Google Patents

Method for recording accessed record of file Download PDF

Info

Publication number
CN106599223A
CN106599223A CN201611174957.3A CN201611174957A CN106599223A CN 106599223 A CN106599223 A CN 106599223A CN 201611174957 A CN201611174957 A CN 201611174957A CN 106599223 A CN106599223 A CN 106599223A
Authority
CN
China
Prior art keywords
file
record
accessed
accessed record
linux
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
Application number
CN201611174957.3A
Other languages
Chinese (zh)
Inventor
金振成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihai Shengyun Technology Co Ltd
Original Assignee
Beihai Shengyun Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beihai Shengyun Technology Co Ltd filed Critical Beihai Shengyun Technology Co Ltd
Priority to CN201611174957.3A priority Critical patent/CN106599223A/en
Publication of CN106599223A publication Critical patent/CN106599223A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for recording an accessed record of a file, and the embodiment is applied to computer equipment with a Linux operating system. When the file is uploaded or accessed, the accessed record of the file is recorded by adopting a Linux file system expansion attribute operation (fattr) mode on the background of the computer equipment with the Linux operating system; and the accessed record of the file comprises user and time of visiting of the file. Therefore, the accessed record of the file is arranged in a scattered manner instead of a concentrated manner in a database in the prior art, so that the safety of the recorded accessed record of the file is ensured; and in addition, the accessed record of the file can be searched easily.

Description

A kind of method that log file is accessed record
Technical field
The present invention relates to field of computer technology, the method that more particularly to a kind of log file is accessed record.
Background technology
With the development of computer technology, there are increasing various types of files in a computer network, it is various The file of type can be accessed by different clients as the shared resource in computer network.Therefore, it is interviewed for file The recording mode of record is asked, the recording mode of the accessed record of particularly important or classified document is proposed out, to ensure Management personnel are checked and are reviewed to the accessed record of file.
At present, when recording to the accessed record of file, using database mode, in the equipment of storage file Special data base is set on itself or InterWorking Equipment, dedicated for the accessed record of statistics file, by the quilt of each file Record is accessed, is stored according to the sequencing respective file of time.When the accessed record of file is subsequently checked, directly The accessed record of corresponding data is transferred from data base.Adopt when recording to the accessed record of file in this way, such as The quantity of fruit file is very big, is such as the data file of magnanimity, then the memory data output of the data base of setting can be caused also non- Chang great, when the accessed record of corresponding data is transferred, needs all storage contents in ergodic data storehouse so that acquisition speed It is very slow.And once the data base for arranging is broken down, the accessed record due to being centralized stores file, so institute can be caused There are loss or the loss of the accessed record of the file of storage, security risk is higher.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of method that log file is accessed record, and the method ensure that The file for being recorded is accessed the safety of record, and is easy to find the accessed record of file.
According to above-mentioned purpose, what the present invention was realized in:
A kind of method that log file is accessed record, including:
Computer equipment with (SuSE) Linux OS, when file is uploaded or accesses, with (SuSE) Linux OS Computer equipment using Linux file system fattr mode log file accessed record, the accessed note of the file Record includes user and the time for accessing file.
When the file is uploaded, the accessed record of the employing Linux file system fattr mode log file is adopted Setfattr modes are operated with extended attribute is arranged.
When the file is accessed, the accessed record of the employing Linux file system fattr mode log file is adopted Getfattr modes are operated with extended attribute is obtained.
Before the accessed record of the log file, also include:
Judge whether to reach the access times of setting, if it is not, then recording the file using getfattr modes Accessed record;If it is, the accessed record of the file for recording at first therein is updated.
The method also includes:
Carried out using any one record in accessed record of the setfattr modes to the recorded file Update.
The method also includes:Adjusted from the computer equipment with (SuSE) Linux OS using getfattr-d file orders Take the accessed record of the file.
The accessed record of the file is binding with the file.
As can be seen from the above scheme, the embodiment of the present invention is applied in the computer equipment with (SuSE) Linux OS, When file is uploaded or accesses, the backstage of the computer equipment with (SuSE) Linux OS is extended using Linux file system The accessed record of property operations (fattr) mode log file, the accessed record of the file include the use for accessing file Family and time.So, the accessed record of file is scattering device, be not concentrate on data base as prior art in set Put, it is ensured that the file for being recorded is accessed the safety of record, and be easy to find the accessed record of file.
Description of the drawings
Fig. 1 is the method flow diagram that log file provided in an embodiment of the present invention is accessed record.
Specific embodiment
To make the objects, technical solutions and advantages of the present invention become more apparent, referring to the drawings and illustrate, to this It is bright to be described in further detail.
The embodiment of the present invention is accessed the safety of record to ensure that recorded file, and is easy to find file Accessed record, in the computer equipment with (SuSE) Linux OS, when file is uploaded or accesses, with Linux The backstage of the computer equipment of operating system operates (fattr) mode log file using Linux file system extended attribute Accessed record, the accessed record of the file include user and the time for accessing file.So, the accessed record of file It is scattering device, is not to concentrate on setting in data base as prior art, solves technical problem.
Fig. 1 is the method flow diagram that log file provided in an embodiment of the present invention is accessed record, and which concretely comprises the following steps:
Step 101, in a computer network computer equipment of the offer with (SuSE) Linux OS;
Step 102, when file is uploaded or accesses, the computer equipment with (SuSE) Linux OS using Linux it is literary The accessed record of part system fattr mode log file, the accessed record of the file include the user for accessing file and Time.
In the method, when the file is uploaded, it is exactly user by files passe to the meter with (SuSE) Linux OS When calculating machine equipment, the accessed record of the employing Linux file system fattr mode log file is using setting extended attribute Operation (setfattr) mode.Give one example explanation:
Setfattr-n user.time1-v " user_name_a, 2016-10-10,21:12:15 " file is provided with text Part including user and the accessed record of time.
In the method, when the file is accessed, the employing Linux file system fattr mode log file Accessed record operates (getfattr) mode using extended attribute is obtained.
In the method, access times can be installed to the file, be such as set to 5 times, when the file it is interviewed When asking, judge whether to reach access times, if it is not, then the accessed note of the file is recorded using getfattr modes Record;If it is, the accessed record of the file for recording at first therein is updated.
Give one example explanation, when 5 times being less than using getfattr modes, be generated as new use.time property values, Such as the file is accessed using getfattr modes to only have 3 times, be generated as new use.time4 property values, including the text The accessed time of part and user;When such as adopting getfattr modes to access the file for 5 times, higher than the access time for arranging The accessed record of the file for recording at first therein is just updated, is updated to the quilt of this file by number Access record, the property value of the use.time1 of the file of concrete modification smallest record.
It is of course also possible to any one record in the accessed record of the recorded file is updated, The mode for adopting is setfattr modes.Such as, need to update the use.time4 property values of the file, directly adopt Setfattr modes update the property value of use.time4:
Setfattr-n user.time4-v " user_name_a, 2016-10-10,21:12:15”
In the method, when the accessed record of the file is inquired about, the method also includes:Using getfattr side Formula, i.e. getfattr-d file orders just can transfer the quilt of the file from the computer equipment with (SuSE) Linux OS Record is accessed, without the need for traveling through in the data of magnanimity from data base as background technology, simply and speed is fast.
In the method, the accessed record of the file and the file are bindings, with the transmission of the file And transmit, when file migration is to other equipment, the accessed record of the file also can be recorded in file attribute always.
Give one example explanation, the accessed of the file is recorded as:
getfatter-d file
#file:a
User.time1=" user_name_a, 2016-10-10,21:12:15”
User.time2=" user_name_b, 2016-10-11,21:12:15”
User.time3=" user_name_c, 2016-11-1,21:12:15”
User.time4=" user_name_d, 2016-11-19,21:12:15”
User.time5=" user_name_b, 2016-11-25,21:12:15”
Preferred embodiment is lifted above, the object, technical solutions and advantages of the present invention is further described, institute It should be understood that presently preferred embodiments of the present invention is the foregoing is only, it is not to limit the present invention, all the present invention's Spirit and principle within, any modification, equivalent and improvement for being made etc., should be included in protection scope of the present invention it It is interior.

Claims (7)

1. a kind of method that log file is accessed record, it is characterised in that include:
Computer equipment with (SuSE) Linux OS, when file is uploaded or accesses, the meter with (SuSE) Linux OS Calculate accessed record of the machine equipment using Linux file system fattr mode log file, the accessed record bag of the file Include the user and time for accessing file.
2. the method for claim 1, it is characterised in that when the file is uploaded, the employing Linux file system The accessed record of fattr mode log files operates setfattr modes using extended attribute is arranged.
3. the method for claim 1, it is characterised in that when the file is accessed, the employing Linux file system The accessed record of fattr mode log files operates getfattr modes using extended attribute is obtained.
4. method as claimed in claim 3, it is characterised in that before the accessed record of the log file, also include:
Judge whether to reach the access times of setting, if it is not, then recording the interviewed of the file using getfattr modes Ask record;If it is, the accessed record of the file for recording at first therein is updated.
5. the method for claim 1, it is characterised in that the method also includes:
It is updated using any one record in accessed record of the setfattr modes to the recorded file.
6. the method as described in Claims 1 to 5 is arbitrary, it is characterised in that the method also includes:Using getfattr-d The accessed record of the file is transferred in file orders from the computer equipment with (SuSE) Linux OS.
7. the method for claim 1, it is characterised in that the accessed record of the file is binding with the file.
CN201611174957.3A 2016-12-19 2016-12-19 Method for recording accessed record of file Pending CN106599223A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611174957.3A CN106599223A (en) 2016-12-19 2016-12-19 Method for recording accessed record of file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611174957.3A CN106599223A (en) 2016-12-19 2016-12-19 Method for recording accessed record of file

Publications (1)

Publication Number Publication Date
CN106599223A true CN106599223A (en) 2017-04-26

Family

ID=58601386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611174957.3A Pending CN106599223A (en) 2016-12-19 2016-12-19 Method for recording accessed record of file

Country Status (1)

Country Link
CN (1) CN106599223A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304724A (en) * 2018-01-25 2018-07-20 中国地质大学(武汉) Document is traced to the source device, system and method
CN108804560A (en) * 2018-05-22 2018-11-13 上海肖克利信息科技股份有限公司 The method for generating accessed listed files recently

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239438A (en) * 2014-08-29 2014-12-24 北京大学深圳研究生院 File information storage method and file information read-write method based on separate storage
CN104239182A (en) * 2014-09-03 2014-12-24 北京鲸鲨软件科技有限公司 Cluster file system split-brain processing method and device
CN106156255A (en) * 2015-04-28 2016-11-23 天脉聚源(北京)科技有限公司 A kind of data buffer storage layer realization method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239438A (en) * 2014-08-29 2014-12-24 北京大学深圳研究生院 File information storage method and file information read-write method based on separate storage
CN104239182A (en) * 2014-09-03 2014-12-24 北京鲸鲨软件科技有限公司 Cluster file system split-brain processing method and device
CN106156255A (en) * 2015-04-28 2016-11-23 天脉聚源(北京)科技有限公司 A kind of data buffer storage layer realization method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙亚楠: "安全操作***自主访问控制机制的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304724A (en) * 2018-01-25 2018-07-20 中国地质大学(武汉) Document is traced to the source device, system and method
CN108804560A (en) * 2018-05-22 2018-11-13 上海肖克利信息科技股份有限公司 The method for generating accessed listed files recently

Similar Documents

Publication Publication Date Title
US8990151B2 (en) Automatic and semi-automatic tagging features of work items in a shared workspace for metadata tracking in a cloud-based content management system with selective or optional user contribution
CN102708136B (en) The index to feature and search including the use of reusable index field
CN103778148B (en) Life cycle management method and equipment for data file of Hadoop distributed file system
CN106462430A (en) Method and device for obtaining application upgrade packages
US20150121453A1 (en) System and method for new database permitting
CN107844274A (en) Hardware resource management method, apparatus and terminal based on super fusion storage system
CN107766470B (en) Intelligent statistical method, intelligent statistical display method and device for data sharing
US20140358868A1 (en) Life cycle management of metadata
US11275795B2 (en) System and method for in-place record content management
CN104572085A (en) Method and device for analyzing application program
CN104978324A (en) Data processing method and device
CN107832470A (en) A kind of object storage method and device based on storage system
US20160323191A1 (en) System and method for granular network access and accounting
CN107800589A (en) To the monitoring method of cloud platform access device, device and its cloud platform used
CN105868056A (en) Method, device and safety virtual machine for acquiring deleted files in Windows virtual machines
CN106021566A (en) Method, device and system for improving concurrent processing capacity of single database
CN106599223A (en) Method for recording accessed record of file
CN107294766B (en) Centralized control method and system
US11283893B2 (en) Method and system for tracking chain of custody on unstructured data
Bugaje et al. Data retrieval= text retrieval?
KR101109425B1 (en) System of managing documents
CN107766216A (en) It is a kind of to be used to obtain the method and apparatus using execution information
CN105303321A (en) Archive management method and apparatus
KR20160050745A (en) Method and Apparatus for Processing Data Based on Real-Time or Batch Processing
CN107515946A (en) Portal management editing system

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

Application publication date: 20170426

RJ01 Rejection of invention patent application after publication