CN111881088A - Linux platform file searching method, equipment and storage medium - Google Patents
Linux platform file searching method, equipment and storage medium Download PDFInfo
- Publication number
- CN111881088A CN111881088A CN202010606961.2A CN202010606961A CN111881088A CN 111881088 A CN111881088 A CN 111881088A CN 202010606961 A CN202010606961 A CN 202010606961A CN 111881088 A CN111881088 A CN 111881088A
- Authority
- CN
- China
- Prior art keywords
- search
- access information
- file
- client
- files
- 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.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000012544 monitoring process Methods 0.000 claims abstract description 6
- 238000004590 computer program Methods 0.000 claims description 10
- 230000004048 modification Effects 0.000 claims description 9
- 238000012986 modification Methods 0.000 claims description 9
- 230000000717 retained effect Effects 0.000 claims 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/144—Query formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method, a device and a storage medium for searching files of a Linux platform, wherein the method comprises the following steps: maintaining a search configuration file, and defining storage fields and storage quantity of client access information; reading a search configuration file, acquiring search configuration data, monitoring and recording access information of a client according to configuration; executing a search instruction to obtain a search result containing access information; and the search results are sorted and displayed according to the specified access information sorting mode. The invention can display the files which are accessed recently or have high access frequency or are modified recently by different clients in a personalized way when executing the command of searching the files according to the appeal of the clients, so that the clients can search the expected files or the directory files more quickly and accurately, and provide the function of positioning the files which are accessed recently or modified recently while searching the files according to the content keywords, thereby realizing the purpose of positioning the directory files which are accessed recently or have high access frequency or are modified recently by one key, and saving the labor time.
Description
Technical Field
The invention relates to the field of server products, in particular to a method, equipment and a storage medium for searching files of a Linux platform.
Background
At present, when files are searched in a Linux platform, some tools can query recently modified files or can query files containing specified content keywords, but the tools do not support the query of the content keywords and simultaneously position recently accessed, high-access-frequency or recently modified files, and do not support personalized query of directory files showing the recent access or high-access-frequency according to different clients. Moreover, when all files under the directory and the subdirectories are queried according to the keywords of the file contents, the subdirectories of the current directory cannot be queried, the query of one directory is needed, and the searched file list is not supported to be arranged according to time sequence, so that the inconvenience of workers in searching the files is caused.
Disclosure of Invention
In order to solve the technical problems, the invention provides a Linux platform file searching method, device and storage medium, which can enable a client to quickly and accurately search a desired file or directory file and display a search result in a personalized manner according to the appeal of the client.
In order to achieve the purpose, the invention adopts the following technical scheme:
a Linux platform file searching method comprises the following steps:
maintaining a search configuration file, and defining storage fields and storage quantity of client access information;
reading a search configuration file, acquiring search configuration data, monitoring and recording access information of a client according to configuration;
executing a search instruction to obtain a search result containing access information;
and the search results are sorted and displayed according to the specified access information sorting mode.
Further, the access information comprises a viewing file name and a directory, viewing time, modifying time and access times.
Further, the monitoring and recording access information of the client according to the configuration includes:
acquiring file access information of a client;
accumulating and calculating the file access times of the client;
and writing the access information record.
Further, the executing search instruction is specifically an executing file search instruction, and the search range is a file recorded in the client access information.
Further, the search executing instruction is specifically a file content executing search instruction, and the search range is a file, a current directory and subdirectories thereof recorded in the client access information.
Further, when the number of the access information stored in the access information record is larger than the storage number of the access information defined in the configuration file, the new access information is reserved, and the old access information is discarded.
Further, the sort pattern includes view time first, access frequency first, and modification time first.
Further, the upper limit of the exposure information is the storage quantity of the access information of the defined client.
The invention also provides a device for searching the files of the Linux platform, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the Linux platform file searching method when executing the computer program.
The present invention further proposes a storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the Linux platform file search method as described above.
The invention has the beneficial effects that:
the invention provides a Linux platform file searching method, equipment and a storage medium, which can display files which are accessed recently or have high access frequency or are modified recently by different clients in a personalized manner when executing a file searching instruction according to the appeal of a client, provide a function of searching the files according to content keywords and positioning the files which are accessed recently or modified recently, realize one-key positioning of directory files which are accessed recently and have high access frequency or are modified recently, facilitate users to search desired files more quickly and accurately and look up the latest or appointed-period files, and save labor time.
Drawings
FIG. 1 is a schematic flow chart of a file searching method of a Linux platform according to an embodiment of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
As shown in fig. 1, an embodiment of the present invention discloses a Linux platform file search method, including:
maintaining a search configuration file, and defining storage fields and storage quantity of client access information;
reading a search configuration file, acquiring search configuration data, monitoring and recording access information of a client according to configuration;
executing a search instruction to obtain a search result containing access information;
and the search results are sorted and displayed according to the specified access information sorting mode.
Specifically, the information defined by the search configuration file includes client information and configuration information of file search management, including a client IP, a storage field and a storage number x of access information, where the access information specifically includes a view file name and directory, view time, modification time, access times, and the like. The configuration file is segmented, and different client users can add their own configuration segments in the configuration file according to a certain format.
The server reads the search configuration file, monitors the actions of a client user for checking and modifying the file on the server after the client SSH is connected with the server, performs access frequency accumulation calculation, writes access information comprising file names and directories, access time, modification time and access frequency into an access information record established for the client according to the definition of the search configuration file, and retains new access information and abandoned access information when the number of the access information stored in the access information record is greater than the storage number of the access information defined in the configuration file.
A client user executes a search instruction on a server, wherein the search instruction can be a file search instruction, and when the file search instruction is executed, the search range is the file recorded in the client access information file; the search instruction can also be a file content search instruction, and the search range is the files, the current directory and the subdirectories thereof recorded in the client access information.
For the searched search result, the search result can be sorted and displayed according to the access information sorting mode specified in the instruction, wherein the search result is sorted and displayed according to the viewing time priority, the access frequency priority or the modification time priority, and the viewing time, the access frequency and the modification time refer to the access information generated by the file accessed and modified by the client user and are isolated from the access information generated by other client connection servers. The upper limit of the information displayed by the embodiment of the invention is the defined storage quantity x of the client access information.
The embodiment of the invention also discloses equipment for searching the files of the Linux platform, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the Linux platform file searching method when executing the computer program.
The embodiment of the invention also discloses a storage medium, wherein a computer program is stored on the storage medium, and the steps of the Linux platform file searching method are realized when the computer program is executed by a processor.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, the scope of the present invention is not limited thereto. Various modifications and alterations will occur to those skilled in the art based on the foregoing description. And are neither required nor exhaustive of all embodiments. On the basis of the technical scheme of the invention, various modifications or changes which can be made by a person skilled in the art without creative efforts are still within the protection scope of the invention.
Claims (10)
1. A method for searching files on a Linux platform is characterized by comprising the following steps:
maintaining a search configuration file, and defining storage fields and storage quantity of client access information;
reading a search configuration file, acquiring search configuration data, monitoring and recording access information of a client according to configuration;
executing a search instruction to obtain a search result containing access information;
and the search results are sorted and displayed according to the specified access information sorting mode.
2. The Linux platform file search method of claim 1, wherein the access information comprises view file names and directories, view time, modification time, and access times.
3. The Linux platform file search method of claim 1, wherein the monitoring and recording access information of the client according to the configuration comprises:
acquiring file access information of a client;
accumulating and calculating the file access times of the client;
and writing the access information record.
4. The method according to claim 3, wherein the executing search instruction is a file executing search instruction, and the search range is a file recorded in the client access information.
5. The method according to claim 3, wherein the search execution instruction is a file content search execution instruction, and the search range is a file, a current directory and subdirectories thereof recorded in the client access information.
6. The method according to claim 3, wherein when the number of access information records stored in the access information record is greater than the number of access information records defined in the configuration file, the new access information is retained and the old access information is discarded.
7. The Linux platform file search method of claim 1, wherein the ranking patterns include view time first, access frequency first, and modification time first.
8. The Linux platform file search method of claim 1, wherein an upper exposure information limit is a defined storage amount of client access information.
9. An apparatus for searching files on a Linux platform, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the Linux platform file search method of any one of claims 1 to 8 when executing the computer program.
10. A storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the Linux platform file search method of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010606961.2A CN111881088A (en) | 2020-06-29 | 2020-06-29 | Linux platform file searching method, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010606961.2A CN111881088A (en) | 2020-06-29 | 2020-06-29 | Linux platform file searching method, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111881088A true CN111881088A (en) | 2020-11-03 |
Family
ID=73157241
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010606961.2A Withdrawn CN111881088A (en) | 2020-06-29 | 2020-06-29 | Linux platform file searching method, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111881088A (en) |
-
2020
- 2020-06-29 CN CN202010606961.2A patent/CN111881088A/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103246595B (en) | Application management method, device, server and terminating unit | |
US7853770B2 (en) | Storage system, data relocation method thereof, and recording medium that records data relocation program | |
US9052938B1 (en) | Correlation and associated display of virtual machine data and storage performance data | |
US7234077B2 (en) | Rapid restoration of file system usage in very large file systems | |
US6330567B1 (en) | Searching system for searching files stored in a hard disk of a personal computer | |
US7873601B1 (en) | Backup of incremental metadata in block based backup systems | |
CN110046133B (en) | Metadata management method, device and system for storage file system | |
US9367569B1 (en) | Recovery of directory information | |
US9824104B2 (en) | System and method for content storage | |
CN103425785A (en) | Data storage system and user data storage and reading method thereof | |
CN111782731A (en) | Data synchronization method and device | |
CN111400101B (en) | Data recovery method and system for deleting JFS2 file system data | |
CN103246718B (en) | File access method, device and equipment | |
CN108647280A (en) | A kind of method and apparatus of memory communicating information | |
CN111881088A (en) | Linux platform file searching method, equipment and storage medium | |
CN111400249A (en) | File storage system and method easy for counting file number | |
CN116383216A (en) | System and method for creating and updating elastic search index based on time stamp | |
CN107741940B (en) | Data storage method and storage system | |
CN114416676A (en) | Data processing method, device, equipment and storage medium | |
CN107609038A (en) | Data clearing method and device | |
CN113590546A (en) | Directory deleting method, device and storage medium | |
CN102915324A (en) | Data storing and retrieving device and data storing and retrieving method | |
CN105512339A (en) | File searcher and searching method | |
US8630984B1 (en) | System and method for data extraction from email files | |
EP0981096A1 (en) | Searching system for searching files stored in a hard disc of a personal computer |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20201103 |
|
WW01 | Invention patent application withdrawn after publication |