CN117971248A - Application program associated file cleaning method and related components - Google Patents
Application program associated file cleaning method and related components Download PDFInfo
- Publication number
- CN117971248A CN117971248A CN202410126409.1A CN202410126409A CN117971248A CN 117971248 A CN117971248 A CN 117971248A CN 202410126409 A CN202410126409 A CN 202410126409A CN 117971248 A CN117971248 A CN 117971248A
- Authority
- CN
- China
- Prior art keywords
- program
- cleaned
- cleaning
- application
- application program
- 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
- 238000004140 cleaning Methods 0.000 title claims abstract description 61
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000004458 analytical method Methods 0.000 claims abstract description 17
- 244000035744 Hura crepitans Species 0.000 claims description 28
- 238000004590 computer program Methods 0.000 claims description 14
- 238000010586 diagram Methods 0.000 description 6
- 238000012217 deletion Methods 0.000 description 4
- 230000037430 deletion Effects 0.000 description 4
- 239000002699 waste material Substances 0.000 description 4
- 230000009191 jumping Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- UBCKGWBNUIFUST-YHYXMXQVSA-N tetrachlorvinphos Chemical compound COP(=O)(OC)O\C(=C/Cl)C1=CC(Cl)=C(Cl)C=C1Cl UBCKGWBNUIFUST-YHYXMXQVSA-N 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses an application program associated file cleaning method and related components. The method comprises the following steps: selecting an application program to be cleaned; traversing a main program package of an application program to be cleaned, and finding out the main program and other built-in programs and taking the main program and the other built-in programs as the program to be cleaned; performing feature identification and analysis on each program to be cleaned to obtain program features of each program to be cleaned; acquiring authority information of each program to be cleaned; cleaning the associated catalogues and files under the program to be cleaned according to the authority information and the program characteristics of each program to be cleaned; searching a container catalog corresponding to each program to be cleaned, and deleting; and acquiring a catalog for storing daemons in the application program to be cleaned, searching all daemons corresponding to the application program to be cleaned, and deleting. The method and the device can thoroughly delete all the files related to the application program to be cleaned, terminate all the processes related to the application program to be cleaned, and avoid occupation of disk space and memory.
Description
Technical Field
The invention relates to the technical field of program uninstallation, in particular to an application program associated file cleaning method and related components.
Background
In macOS systems, typically, the user only needs to copy the application to the/Applications directory, and when deleting, only needs to delete the previously copied application (i.e., app) from the/Applications directory. However, the deletion only deletes the application program itself, does not process related files of the product in the running process, and does not delete the extension program and daemon installed by the user, so that a lot of garbage files remain in the system, especially after the user uses the application program for a long time to unload, the remaining garbage files are more, and the disk space of the computer is occupied, for example: program temporary files, log files, cache files, configuration files, download files and the like, may also leave startup items and daemon files, and the startup items and daemon may be started up while the application program is deleted, so that not only disk space is occupied, but also running memory resources are occupied.
Disclosure of Invention
The invention aims to provide a method for cleaning an associated file of an application program and related components, and aims to solve the problem that the existing unloading mode of the application program is difficult to thoroughly unload a residual file.
In a first aspect, an embodiment of the present invention provides a method for cleaning an application associated file, including:
Selecting an application program to be cleaned;
traversing the main program package of the application program to be cleaned, and finding out the main program and other built-in programs and taking the main program and other built-in programs as the program to be cleaned;
performing feature recognition and analysis on each program to be cleaned to obtain program features of each program to be cleaned;
Acquiring authority information of each program to be cleaned;
judging whether a sand box is supported or not according to the authority information of each program to be cleaned;
If the program to be cleaned supports a sandbox, cleaning a catalog with access and writable authorities in authority information of the program to be cleaned;
If the program to be cleaned does not support a sand box, searching a related file in a catalog of the program to be cleaned according to the program characteristics of the program to be cleaned and cleaning;
Searching a container catalog corresponding to each program to be cleaned, and deleting;
And acquiring a catalog for storing daemons and starting items in the application program to be cleaned, and searching and deleting all daemons and starting items corresponding to the application program to be cleaned.
In a second aspect, an embodiment of the present invention provides an application program associated file cleaning apparatus, including:
The selecting unit is used for selecting an application program to be cleaned;
the searching unit is used for traversing the main program package of the application program to be cleaned, searching out the main program and other built-in programs and taking the main program and other built-in programs as the program to be cleaned;
The feature recognition unit is used for carrying out feature recognition and analysis on each program to be cleaned to obtain the program feature of each program to be cleaned;
the acquisition unit is used for acquiring the authority information of each program to be cleaned;
the judging unit is used for judging whether the sand box is supported or not according to the authority information of each program to be cleaned;
The first cleaning unit is used for cleaning the catalogue with access and writable rights in the rights information of the program to be cleaned if the program to be cleaned supports a sandbox;
The second cleaning unit is used for searching the associated files in the catalogue of the program to be cleaned according to the program characteristics of the program to be cleaned and cleaning if the program to be cleaned does not support the sand box;
the third cleaning unit is used for searching the container catalogue corresponding to each program to be cleaned and deleting the container catalogue;
And the fourth cleaning unit is used for acquiring the catalogues for storing the daemon and the starting item in the application program to be cleaned, searching all daemon and starting item corresponding to the application program to be cleaned, and deleting.
In a third aspect, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the method for cleaning an application association file according to the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where the computer readable storage medium stores a computer program, where the computer program when executed by a processor causes the processor to execute the application related file cleaning method described in the first aspect.
The beneficial effects of the invention are as follows: the scheme for thoroughly deleting the application programs to be cleaned is more complete, all files related to the application programs to be cleaned can be thoroughly deleted, and all processes related to the application programs to be cleaned are terminated, so that occupation of disk space and memory is avoided, and resource waste is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart illustrating a method for cleaning an application associated file according to an embodiment of the present invention;
FIG. 2 is a schematic sub-flowchart of a method for cleaning application associated files according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another sub-flowchart of an application associated file cleaning method according to an embodiment of the present invention;
FIG. 4 is a schematic block diagram of an application associated file cleaning device according to an embodiment of the present invention;
Fig. 5 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for cleaning an application associated file according to an embodiment of the present invention;
as shown in fig. 1, the method includes steps S101 to S109.
S101, selecting an application program to be cleaned;
s102, traversing a main program package of an application program to be cleaned, and finding out the main program and other built-in programs and taking the main program and the other built-in programs as the program to be cleaned;
In the step, the program to be cleaned is the related program remained when the application program is unloaded, and mainly comprises a subprogram, an extension program, a startup program, an independent process and other programs;
S103, carrying out feature recognition and analysis on each program to be cleaned to obtain program features of each program to be cleaned;
S104, acquiring authority information of each program to be cleaned;
S105, judging whether a sand box is supported according to the authority information of each program to be cleaned, if so, entering a step S106, and if not, jumping to a step S107; step S108 is skipped until step S106 and step S107 are completed;
s106, cleaning the catalogue with access and writable rights in the rights information of the program to be cleaned;
s107, searching for related files in a catalog of the program to be cleaned according to the program characteristics of the program to be cleaned and cleaning;
In the steps S103 to S107, deleting the associated catalogue and file under each program to be cleaned based on the acquired authority information and the program characteristics;
s108, searching a container catalog corresponding to each program to be cleaned, and deleting;
In the step, no matter whether the program to be cleaned supports a sandbox or not, a container directory is provided, and the container directory stores a named (Bundle Identifier named) directory carrying a unique identifier of the program to be cleaned, wherein files such as supporting files, log files, cache files, program storage states, downloaded files, documents, pictures, audio, video and the like may be stored; searching the catalogue named by the appointed unique identifier under the container catalogue of each program to be cleaned and deleting the catalogue;
S109, acquiring a catalog for storing daemons and starting items in the application program to be cleaned, and searching out and deleting all daemons and starting items corresponding to the application program to be cleaned.
In this step, among the directories for storing daemons and startup items in the application to be cleaned, each directory is traversed and daemons and startup items named with unique identifiers of the application to be cleaned (Bundle Identifier names) are found and deleted.
In this embodiment, based on the processes of steps S101 to S109, a more complete scheme for thoroughly deleting the application program to be cleaned is provided, so that all files related to the application program to be cleaned can be thoroughly deleted, and all processes related to the application program to be cleaned are terminated, thereby avoiding occupation of disk space and memory, and reducing resource waste.
In one embodiment, step S102 includes: traversing the main program package of the application program to be cleaned, finding out the main program and at least one of a built-in subprogram, an extension program, a starting item program and an independent process according to the extension name, and taking the main program as the program to be cleaned.
In this embodiment, the main program package is traversed, and files with all extension names app and app ex are searched, namely, a subroutine, an extension program, a startup item program and the like. Traversing the main program package, and executing a command on each file: "file/path/to/file", the return result contains: "Mach-O64-bit" is an independent process or other binary executable.
In one embodiment, as shown in fig. 2, step S103 includes:
s201, acquiring a format of each program to be cleaned;
s202, judging whether each program to be cleaned is in a Mach-O format, if so, entering a step S203, and if not, jumping to a step S204;
S203, executing codesign commands on the program to be cleaned, outputting an analysis result, and reading a corresponding unique identifier in the analysis result;
S204, analyzing the running configuration file in the program to be cleaned, and respectively obtaining the product name, the product desktop display name, the unique product identifier and the unique identifier of the daemon with root permission corresponding to the program to be cleaned.
In this embodiment, feature recognition and analysis are required to be performed on each program to be cleaned one by one. Specifically, if the program to be cleaned is a Mach-O format file, executing codesign command ("codesign-d-vv-ENTITLEMENTS-/path/to/file") can output Identifier field information, and by reading the Identifier field information, a unique Identifier corresponding to the program to be cleaned can be obtained. If the program to be cleaned is not a Mach-O format file, the program to be cleaned is usually an app format file or appex format file, the running configuration file (Contents/info. Plist file) in the program to be cleaned is parsed, so that the product name (CFBundleName), the product desktop display name (CFBundleDisplayName), the product unique identifier (CFBundleIdentifier) and the unique identifier (SMPrivilegedExecutables) of the daemon with root authority corresponding to the program to be cleaned are respectively obtained. And taking the obtained characteristics as program characteristics of each program to be cleaned so as to facilitate subsequent inquiry of the associated files.
In one embodiment, step S104 includes:
Executing codesign commands on each program to be cleaned, outputting analysis results, and reading the corresponding Boolean value of whether the sandbox is supported or not and the directory with access and writable permission in each analysis result.
In this embodiment, a command codesign is executed for each program to be cleaned, and a com.apple.security.app-sandbox field is output, which corresponds to whether the current program or process supports a sandbox, and whether the sandbox is supported or not can be determined by determining a boolean value (a Bool type value) corresponding to the field; and obtaining a directory with access and writeable rights that needs to be authorized when supporting the sandbox (the directory can only store the associated files of the program to be cleaned).
In one embodiment, step S106 includes the following two cases:
First case: if the Boolean value corresponding to the program to be cleaned is true, judging that the program to be cleaned supports a sandbox, searching subdirectories or files containing the program name and the unique identifier corresponding to the program to be cleaned in the catalogues with access and writable rights, wherein the subdirectories or files are commonly used for storing pictures, audios, videos and downloaded files related to the program to be cleaned, and deleting the searched files.
Second case: if the boolean value corresponding to the program to be cleaned is false, judging that the program to be cleaned does not support the sandbox, searching a setting file directory, a log file directory, a cache file directory, other file directories, a program storage state file directory and a temporary file directory under the program to be cleaned according to the program characteristics of the program to be cleaned, wherein the directories are commonly used for storing different types of files such as supporting files, cache files, log files, setting files, temporary files, program storage state files, pictures, audio, video and files downloaded by users related to the program to be cleaned, and deleting the files after searching.
Based on the two conditions, the method can further deeply clean the associated files of the program to be cleaned, effectively avoid occupation of disk space and memory, and reduce resource waste.
In one embodiment, as shown in fig. 3, step S109 includes:
S301, traversing all catalogues of the application program to be cleaned, and finding out all daemons and starting items named by unique identifiers of the application program to be cleaned;
s302, judging whether each daemon process has root permission, if so, entering a step S303, and if not, jumping to a step S304;
S303, acquiring root rights, terminating the daemon process and the startup item, and deleting the daemon process and the startup item.
S304, terminating the daemon and the startup item, and deleting the daemon and the startup item.
In this embodiment, the daemon and the startup item of the application to be cleaned typically have the following a, b, c, d directories:
a. The Library/LaunchAgents runs after the current common user logs in;
b. the Library/LaunchAgents is run after the current administrator user logs in;
c. Before any user logs in, the Library/LaunchDaemons runs with root authority;
d. After the current user logs in, the Library/PrivilegedHelperTools runs with root authority;
The daemon in a, b, c and d is the process itself, and the daemon with root authority needs to have the signature of the daemon contained in the main program to be normally used.
And for the catalogues a and b, operations such as termination operation and deletion can be performed without root permission, namely traversing the catalogues a and b, searching all daemons and starting items named by unique identifiers of the application programs to be cleaned, then operating the daemons and the starting items to terminate, and deleting the daemons and the starting items.
For the catalog c and the catalog d, root authority is required to perform operations such as termination operation and deletion, so that an independent auxiliary program is required to be manufactured, the operations such as searching, termination operation and file deletion are included, a system interface (AuthorizationExecuteWithPrivileges) is used for operating the auxiliary program, a system popup box prompts a user to input an administrator account number and a password for authorization during calling, the root authority can be obtained after correct information input by the user is received, then the daemon/starting item is executed with a 'kill-9 process/starting item name', the daemon/starting item operation can be forcedly terminated, and then the daemon/starting item can be deleted after the terminated daemon/starting item is executed with a 'rm-f process/starting item path'.
The embodiment of the invention also provides an application program associated file cleaning device which is used for executing any embodiment of the application program associated file cleaning method. Specifically, referring to fig. 4, fig. 4 is a schematic block diagram of an application program associated file cleaning apparatus according to an embodiment of the present invention.
As shown in fig. 4, the application program associated file cleaning device 400 includes: a selection unit 401, a search unit 402, a feature recognition unit 403, an acquisition unit 404, a judgment unit 405, a first cleaning unit 406, a second cleaning unit 407, a third cleaning unit 408, and a fourth cleaning unit 409.
A selecting unit 401, configured to select an application program to be cleaned;
The searching unit 402 is configured to traverse a main program package of an application program to be cleaned, find out the main program and other built-in programs, and use the main program and other built-in programs as the application program to be cleaned;
a feature recognition unit 403, configured to perform feature recognition and analysis on each program to be cleaned, so as to obtain a program feature of each program to be cleaned;
An acquiring unit 404, configured to acquire authority information of each program to be cleaned;
a judging unit 405, configured to judge whether to support a sandbox according to authority information of each program to be cleaned;
The first cleaning unit 406 is configured to clean a directory having access and writable rights in the rights information of the program to be cleaned if the program to be cleaned supports a sandbox;
The second cleaning unit 407 is configured to search, if the program to be cleaned does not support the sandbox, for an associated file in a directory of the program to be cleaned according to a program feature of the program to be cleaned and clean the associated file;
A third cleaning unit 408, configured to search a container directory corresponding to each program to be cleaned, and delete the container directory;
and a fourth cleaning unit 409, configured to obtain a directory for storing daemons and startup items in the application to be cleaned, find out all daemons and startup items corresponding to the application to be cleaned, and delete the daemons and startup items.
The device provides a more complete scheme for thoroughly deleting the application programs to be cleaned, can thoroughly delete all files related to the application programs to be cleaned, and terminates all processes related to the application programs to be cleaned, thereby avoiding occupation of disk space and memory and reducing resource waste.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and units described above may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
The above-described application association file cleaning apparatus may be implemented in the form of a computer program which can be run on a computer device as shown in fig. 5.
Referring to fig. 5, fig. 5 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device 500 is a server, and the server may be a stand-alone server or a server cluster formed by a plurality of servers.
With reference to FIG. 5, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform an application association file cleaning method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform an application association file cleaning method.
The network interface 505 is used for network communication, such as providing for transmission of data information, etc. It will be appreciated by those skilled in the art that the architecture shown in fig. 5 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting of the computer device 500 to which the present inventive arrangements may be implemented, as a particular computer device 500 may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Those skilled in the art will appreciate that the embodiment of the computer device shown in fig. 5 is not limiting of the specific construction of the computer device, and in other embodiments, the computer device may include more or less components than those shown, or certain components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may include only a memory and a processor, and in such embodiments, the structure and function of the memory and the processor are consistent with the embodiment shown in fig. 5, and will not be described again.
It should be appreciated that in embodiments of the present invention, the Processor 502 may be a central processing unit (Central Processing Unit, CPU), the Processor 502 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program when executed by a processor implements the application program associated file cleaning method of the embodiment of the present invention.
The storage medium is a physical, non-transitory storage medium, and may be, for example, a U-disk, a removable hard disk, a Read-only memory (ROM), a magnetic disk, or an optical disk.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device and unit described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (10)
1. An application program associated file cleaning method is characterized by comprising the following steps:
Selecting an application program to be cleaned;
traversing the main program package of the application program to be cleaned, and finding out the main program and other built-in programs and taking the main program and other built-in programs as the program to be cleaned;
performing feature recognition and analysis on each program to be cleaned to obtain program features of each program to be cleaned;
Acquiring authority information of each program to be cleaned;
judging whether a sand box is supported or not according to the authority information of each program to be cleaned;
If the program to be cleaned supports a sandbox, cleaning a catalog with access and writable authorities in authority information of the program to be cleaned;
If the program to be cleaned does not support a sand box, searching a related file in a catalog of the program to be cleaned according to the program characteristics of the program to be cleaned and cleaning;
Searching a container catalog corresponding to each program to be cleaned, and deleting;
And acquiring a catalog for storing daemons and starting items in the application program to be cleaned, and searching and deleting all daemons and starting items corresponding to the application program to be cleaned.
2. The method for cleaning application program related files according to claim 1, wherein the step of traversing the main program package of the application program to be cleaned, finding out the main program and other built-in programs and using the main program and the other built-in programs as the application program to be cleaned includes:
Traversing the main program package of the application program to be cleaned, finding out the main program and at least one of a built-in subprogram, an extension program, a starting item program and an independent process according to the extension name, and taking the main program as the program to be cleaned.
3. The method for cleaning application program related files according to claim 1, wherein said step of performing feature recognition and analysis on each of said programs to be cleaned to obtain program features of each of said programs to be cleaned comprises:
acquiring the format of each program to be cleaned;
judging whether each program to be cleaned is in a Mach-O format or not;
If the program to be cleaned is in Mach-O format, executing codesign commands on the program to be cleaned, outputting an analysis result, and reading a corresponding unique identifier in the analysis result;
If the program to be cleaned is not in the Mach-O format, analyzing an operation configuration file in the program to be cleaned, and respectively obtaining a product name, a product desktop display name, a product unique identifier and a unique identifier of a daemon with root permission, which correspond to the program to be cleaned.
4. The application program associated file cleaning method according to claim 1, wherein the step of acquiring the authority information of each program to be cleaned comprises:
Executing codesign commands on each program to be cleaned, outputting analysis results, and reading the corresponding Boolean value of whether the sandbox is supported or not and the directory with access and writable authorities in each analysis result.
5. The method for cleaning application program associated files according to claim 4, wherein if the program to be cleaned supports a sandbox, the step of cleaning a directory having access and writable rights in rights information of the program to be cleaned includes:
if the Boolean value corresponding to the program to be cleaned is true, judging that the program to be cleaned supports a sandbox, searching a subdirectory or a file which contains a program name and a unique identifier corresponding to the program to be cleaned in the catalogue with access and writable rights, and deleting.
6. The method for cleaning application program associated files according to claim 4, wherein if the program to be cleaned does not support a sandbox, searching the associated files in the directory of the program to be cleaned according to the program characteristics of the program to be cleaned, and cleaning the associated files, includes:
If the Boolean value corresponding to the program to be cleaned is false, judging that the program to be cleaned does not support a sandbox, searching a setting file directory, a log file directory, a cache file directory, other file directories, a program storage state file directory and a temporary file directory under the program to be cleaned according to the program characteristics of the program to be cleaned, and searching and deleting associated files of the program to be cleaned in each directory.
7. The method for cleaning application program associated files according to claim 1, wherein the step of obtaining a directory for storing daemons and startup items in the application program to be cleaned, and searching and deleting all daemons and startup items corresponding to the application program to be cleaned comprises the steps of:
Traversing all catalogues of the application programs to be cleaned, and finding out all daemons and starting items named by unique identifiers of the application programs to be cleaned;
Judging whether each daemon has root authority or not;
if the daemon has the root authority, the root authority is obtained, the daemon and the starting item are terminated, and the daemon and the starting item are deleted.
If the daemon does not have the root authority, terminating the daemon and the starting item, and deleting the daemon and the starting item.
8. An application program associated file cleaning device, comprising:
The selecting unit is used for selecting an application program to be cleaned;
the searching unit is used for traversing the main program package of the application program to be cleaned, searching out the main program and other built-in programs and taking the main program and other built-in programs as the program to be cleaned;
The feature recognition unit is used for carrying out feature recognition and analysis on each program to be cleaned to obtain the program feature of each program to be cleaned;
the acquisition unit is used for acquiring the authority information of each program to be cleaned;
the judging unit is used for judging whether the sand box is supported or not according to the authority information of each program to be cleaned;
The first cleaning unit is used for cleaning the catalogue with access and writable rights in the rights information of the program to be cleaned if the program to be cleaned supports a sandbox;
The second cleaning unit is used for searching the associated files in the catalogue of the program to be cleaned according to the program characteristics of the program to be cleaned and cleaning if the program to be cleaned does not support the sand box;
the third cleaning unit is used for searching the container catalogue corresponding to each program to be cleaned and deleting the container catalogue;
And the fourth cleaning unit is used for acquiring the catalogues for storing the daemon and the starting item in the application program to be cleaned, searching all daemon and starting item corresponding to the application program to be cleaned, and deleting.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the application associated file cleaning method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, causes the processor to perform the application associated file cleaning method according to any one of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410126409.1A CN117971248A (en) | 2024-01-30 | 2024-01-30 | Application program associated file cleaning method and related components |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410126409.1A CN117971248A (en) | 2024-01-30 | 2024-01-30 | Application program associated file cleaning method and related components |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117971248A true CN117971248A (en) | 2024-05-03 |
Family
ID=90862303
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410126409.1A Pending CN117971248A (en) | 2024-01-30 | 2024-01-30 | Application program associated file cleaning method and related components |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117971248A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119201152A (en) * | 2024-11-28 | 2024-12-27 | 麒麟软件有限公司 | A dynamic executable file management method and system for Linux system |
-
2024
- 2024-01-30 CN CN202410126409.1A patent/CN117971248A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119201152A (en) * | 2024-11-28 | 2024-12-27 | 麒麟软件有限公司 | A dynamic executable file management method and system for Linux system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20130067448A1 (en) | Application deployment | |
| US9235703B2 (en) | Virus scanning in a computer system | |
| CN105867947A (en) | Data processing method and device after upgrades of preset applications | |
| US10943023B2 (en) | Method for filtering documents and electronic device | |
| US20170351507A1 (en) | Silent upgrade of software with dependencies | |
| CN112579202B (en) | Method, device, equipment and storage medium for editing server program of Windows system | |
| CN115167882B (en) | A method and device for obtaining compatibility between an operating system and an application program | |
| CN102214088A (en) | Document unlocking method and device | |
| US9129109B2 (en) | Method and apparatus for detecting a malware in files | |
| CN117971248A (en) | Application program associated file cleaning method and related components | |
| EP3108400B1 (en) | Virus signature matching method and apparatus | |
| US6917953B2 (en) | System and method for verifying database security across multiple platforms | |
| CN114706825A (en) | File scanning method and device, terminal equipment and storage medium | |
| CN113722002B (en) | Method and system for obtaining command line parameters, electronic device and storage medium | |
| CN106484779B (en) | File operation method and device | |
| US9390090B2 (en) | Concurrent long spanning edit sessions using change lists with explicit assumptions | |
| CN114385657A (en) | Data storage method, device and storage medium | |
| US9626371B2 (en) | Attribute selectable file operation | |
| CN105975567B (en) | Method and device for processing internal file of application program | |
| US9990369B2 (en) | Method and apparatus for scanning files | |
| CN113867742B (en) | How to handle, install, and uninstall applications | |
| CN112650713A (en) | File system operation method, device, equipment and storage medium | |
| CN114281766A (en) | A TrueCrypt hidden partition identification method, terminal device and storage medium | |
| CN112416866A (en) | Method, device and electronic device for detecting duplicate files | |
| US20240427737A1 (en) | Directory tree delete as a supported file system operation |
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 |