A method, system, device and storage medium for redirecting home directory
By real-time detection and redirecting home directories in Linux systems, the data loss problem caused by system crashes is solved, the security of files and data is achieved and the operation is simplified, and the user experience is improved.
Patent Information
- Application Number
- CN202111663838.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-12-30
AI Technical Summary
Linux system saves user files in the user directory of the system disk by default, resulting in the risk of personal files and data loss when the system crashes.
Check whether the home directory is on the system disk in real time, and prompt the user to redirect, select the target data disk, synchronize the files, and mount the home directory to the new data disk after the system restarts to avoid data loss.
It effectively avoids the loss of user personal files and data caused by system crashes, simplifies user operations, and improves data security and user experience.
Smart Images

Figure CN114528249B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, system, device and storage medium for redirecting a home directory. Background Art
[0002] By default, the Linux system saves the user's personal files to the user directory or a subdirectory of the user directory, that is, / home / $USER / . Therefore, when most users use the Linux system, if they save personal files according to the default configuration, their personal files will be saved in the user directory. When the home directory is on the system disk, the user directory is at risk of losing the user's personal files and data due to a Linux system crash. Summary of the invention
[0003] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.
[0004] To this end, an object of an embodiment of the present invention is to provide a home directory redirection method, which realizes real-time detection and redirection of the partition where the home directory is located.
[0005] Another object of an embodiment of the present invention is to provide a home directory redirection system.
[0006] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:
[0007] In a first aspect, an embodiment of the present invention provides a home directory redirection method, comprising the following steps:
[0008] Determine whether the home directory is on the system disk. If so, prompt the user to send a redirection boot command;
[0009] According to the redirection boot instruction, prompting the user to select a first data disk, where the first data disk is the target partition for redirecting the home directory;
[0010] Determine whether the files in the first data disk and the user directory have been saved and closed, and if so, synchronize the first data to the first data disk to generate second data, where the first data is the data in the user directory;
[0011] By comparing the first data with the second data, determining whether the synchronization of the first data is completed;
[0012] If the synchronization of the first data is completed, the user is prompted to send a redirection execution instruction;
[0013] According to the redirection execution instruction, the home directory is redirected to the first data disk.
[0014] A home directory redirection method in an embodiment of the present invention avoids the problem of loss of user personal files and data caused by system crash by reminding the user in real time to redirect the home directory in the system disk, simplifies the operation of the user when using the Linux system, and enables the user to save personal files and data by default while taking into account the security of files and data; and improves the user's experience by providing redirection guidance and operation prompts to the user.
[0015] In addition, a home directory redirection method according to the above embodiment of the present invention may also have the following additional technical features:
[0016] Furthermore, in a home directory redirection method according to an embodiment of the present invention, the step of prompting the user to select a first data disk according to the redirection boot instruction includes:
[0017] According to the redirection boot instruction, display a data disk list;
[0018] In response to a data disk selection instruction, the first data disk is selected from the data disk list.
[0019] Further, in one embodiment of the present invention, the determining whether the files in the first data disk and the user directory have been saved and closed, and if so, synchronizing the first data to the first data disk to generate the second data, comprises:
[0020] Display the data synchronization interface and prompt the user to send a data synchronization instruction;
[0021] According to the data synchronization instruction, save the first mount path to a configuration file of system redirection, wherein the first mount path is a mount path of the first data disk;
[0022] According to the first mounting path, the first data is synchronized to the first data disk, the second data is generated, and the synchronization progress is displayed.
[0023] Further, in one embodiment of the present invention, the determining whether the files in the first data disk and the user directory have been saved and closed, and if so, synchronizing the first data to the first data disk to generate the second data, further includes:
[0024] If not, the user is prompted to save and close the first data disk and the files in the user directory.
[0025] Further, in one embodiment of the present invention, judging whether the synchronization of the first data is completed by comparing the first data with the second data includes:
[0026] If not, the user is prompted to resend the data synchronization instruction.
[0027] Further, in one embodiment of the present invention, redirecting the home directory to the first data disk according to the redirection execution instruction includes:
[0028] Writing the rule for mounting the first data disk to the home directory into the system mounting rule description file;
[0029] Prompt the user to restart the system.
[0030] Further, in one embodiment of the present invention, the step of determining whether the home directory is on the system disk and, if so, prompting the user to send a redirection boot instruction, further includes:
[0031] If not, check whether the home directory has been redirected;
[0032] If yes, obtaining the first mount path through the configuration file, and creating a soft link from the home directory to the first mount path;
[0033] If not, the redirection process is terminated.
[0034] In a second aspect, an embodiment of the present invention provides a home directory redirection system, including:
[0035] The first judgment module is used to judge whether the home directory is in the system disk, and if so, prompt the user to send a redirection boot instruction;
[0036] A first prompting module, configured to prompt a user to select a first data disk according to the redirection boot instruction;
[0037] A second judgment module is used to judge whether the files in the first data disk and the user directory have been saved and closed, and if so, synchronize the first data to the first data disk to generate second data;
[0038] A third judgment module, used for judging whether the synchronization of the first data is completed by comparing the first data with the second data;
[0039] A second prompt module, configured to prompt the user to send a redirection execution instruction if the first data synchronization is completed;
[0040] A user directory redirection module is used to redirect the home directory to the first data disk according to the redirection execution instruction.
[0041] In a third aspect, an embodiment of the present invention provides a home directory redirection device, comprising:
[0042] at least one processor;
[0043] at least one memory for storing at least one program;
[0044] When the at least one program is executed by the at least one processor, the at least one processor implements the home directory redirection method.
[0045] In a fourth aspect, an embodiment of the present invention provides a storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the home directory redirection method.
[0046] The advantages and benefits of the present invention will be partially given in the following description, and partially become apparent from the following description, or be understood through the practice of the present application:
[0047] The embodiment of the present invention avoids the problem of loss of user personal files and data caused by system crash by reminding the user in real time to redirect the home directory in the system disk, allowing the user to save personal files and data by default while taking into account the security of files and data, simplifying the user's operation when using the Linux system and improving the security of user data; by providing redirection guidance and operation prompts to the user, the user experience is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following introduction is made to the drawings of the embodiments of the present application or the related technical solutions in the prior art. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present application. For technical personnel in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 A schematic diagram of a flow chart of a specific embodiment of a home directory redirection method of the present invention;
[0050] Figure 2 It is a structural schematic diagram of a specific embodiment of a home directory redirection system of the present invention;
[0051] Figure 3 It is a structural diagram of a specific embodiment of a home directory redirection device of the present invention. DETAILED DESCRIPTION
[0052] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limitations on the present application. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0053] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present invention and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0054] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0055] By default, the Linux system saves the user's personal files to the user directory or a subdirectory of the user directory, that is, / home / $USER / . Therefore, when most users use the Linux system, if they save personal files according to the default configuration, their personal files will be saved in the user directory. When the home directory is on the system disk, the user directory is at risk of losing the user's personal files and data due to a Linux system crash.
[0056] To this end, the present invention proposes a home directory redirection method and system, which avoids the problem of user personal files and data loss caused by system crash by reminding users in real time to redirect the home directory in the system disk, allowing users to save personal files and data by default while taking into account file and data security, simplifying user operations when using the Linux system, and improving the security of user data; by providing redirection guidance and operation prompts to users, the user experience is improved.
[0057] A method and system for redirecting a home directory according to an embodiment of the present invention will be described in detail below with reference to the accompanying drawings. First, a method for redirecting a home directory according to an embodiment of the present invention will be described with reference to the accompanying drawings.
[0058] Reference Figure 1 In an embodiment of the present invention, a home directory redirection method is provided. A home directory redirection method in an embodiment of the present invention can be applied to a terminal, a server, or software running in a terminal or a server. The terminal can be a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDNs), and big data and artificial intelligence platforms. A home directory redirection method in an embodiment of the present invention mainly includes the following steps:
[0059] S101, determining whether the home directory is on the system disk, if so, prompting the user to send a redirection boot instruction;
[0060] Specifically, the system disk is a partition where the home directory stores system configuration files. If the home directory is stored in the system disk, the data in the user directory will be at risk of being lost when the system crashes. In addition, when the user uses the system, personal files and data are saved to the user directory by default. If important personal data is involved, it is even more important to pay attention to the risk of data loss caused by system crashes. In an embodiment of the present invention, when the user starts the system, it will automatically detect and determine whether the home directory is on the system disk. If the home directory is on the system disk, it will be displayed through the interface to prompt the user to redirect the home directory.
[0061] In an embodiment of the present invention, if it is detected that the home directory is in a partition other than the system disk, it is further determined whether the home directory has been redirected. If the home directory has been redirected, a soft link is created from the home directory to the mount path of the data disk before redirection, and the redirection process ends. The details are as follows:
[0062] (1) If the home directory is redirected, obtain the first mount path through the system redirection configuration file ( / etc / xdg / nde / home-redirection.conf), and create a soft link from the home directory to the first mount path;
[0063] (2) If the home directory has not been redirected, the redirection process is terminated.
[0064] S102, prompting the user to select a first data disk according to the redirection boot instruction;
[0065] The first data disk is the target partition for redirecting the home directory.
[0066] Specifically, according to step S101, when the home directory is in the system disk, the user is prompted to send a redirection boot instruction through the interface display. When the redirection boot instruction is received, the user is prompted to select the first data disk through the interface display.
[0067] S102 can be further divided into the following steps S1021-S1022:
[0068] Step S1021, displaying a data disk list according to the redirection boot instruction;
[0069] Specifically, when a redirection boot instruction is received, the interface will display selectable disk partitions (data disk list) to prompt the user to select the first data disk.
[0070] Step S1022: In response to the data disk selection instruction, select the first data disk from the data disk list.
[0071] Specifically, according to step S1021, after the user selects the first data disk through the data disk list, a data disk selection instruction is initiated, and according to the data disk selection instruction, the first data disk is selected as the target partition for redirecting the home directory.
[0072] S103, determining whether the files in the first data disk and the user directory have been saved and closed, and if so, synchronizing the first data to the first data disk to generate second data;
[0073] The first data is the data in the user directory, and the second data is the data after the first data is synchronized to the first data disk.
[0074] Specifically, the data (first data) in the home directory in the system disk is synchronized to the first data disk, thereby avoiding the risk of loss of user personal data due to system crash.
[0075] In an embodiment of the present invention, when it is detected that the files in the first data disk and the user directory are not saved or closed, the user is prompted to save and close the files in the first data disk and the user directory.
[0076] S103 can be further divided into the following steps S1031-S1033:
[0077] Step S1031, displaying a data synchronization interface, prompting the user to send a data synchronization instruction;
[0078] Specifically, a data synchronization interface is displayed, a data synchronization button is displayed in the data synchronization interface, and the user is prompted to click the data synchronization button to send a data synchronization instruction.
[0079] Step S1032: according to the data synchronization instruction, save the first mount path to the system redirection configuration file ( / etc / xdg / nde / home-redirection.conf);
[0080] The first mounting path is the mounting path of the first data disk.
[0081] Specifically, according to step S1031, after the user clicks the data synchronization button, a data synchronization instruction is sent. According to the data synchronization instruction, the first mount path is saved to the system redirection configuration file (( / etc / xdg / nde / home-redirection.conf)).
[0082] Step S1033: synchronize the first data to the first data disk according to the first mounting path, generate the second data, and display the synchronization progress.
[0083] Specifically, according to the first mounting path in step S1032, the first data is synchronized to the root directory of the first data disk through sync, the second data is generated, and the progress of data synchronization is displayed on the data synchronization interface.
[0084] In an embodiment of the present invention, after the first mount path is saved to the system redirection configuration file ( / etc / xdg / nde / home-redirection.conf) and the first data is synchronized, the security context of the root directory of the first data disk is set to the type of the user directory, so that the second data has the same attributes as the first data, and a soft link is created according to the first mount path after the system is restarted, thereby realizing the opening of the second data without affecting the user history record.
[0085] S104, determining whether synchronization of the first data is completed by comparing the first data with the second data;
[0086] Specifically, according to step S1033, the data synchronization interface displays the progress of data synchronization in real time. After the data synchronization progress is completed, it is determined whether the first data has been completely synchronized to the first data disk. The steps for determining whether the synchronization of the first data is completed are as follows:
[0087] (1) comparing the first data and the second data;
[0088] (2) If there is a difference between the first data and the second data, the data synchronization is not completed;
[0089] (3) If the first data and the second data are the same, the data synchronization is completed.
[0090] In an embodiment of the present invention, if the first data is not completely synchronized to the first data disk, the user is prompted to resend the data synchronization instruction to resynchronize the first data.
[0091] S105: If the first data synchronization is completed, prompt the user to send a redirection execution instruction;
[0092] Specifically, if the first data has been completely synchronized to the first data disk, a redirection execution button is displayed through the interface, prompting the user to click the redirection execution button to send a redirection execution instruction.
[0093] S106. Redirect the home directory to the first data disk according to the redirection execution instruction.
[0094] Specifically, when the user clicks the redirection execution button, a redirection execution instruction is sent. According to the redirection execution instruction, the home directory is redirected to the first data disk.
[0095] S106 can be further divided into the following steps S1061-S1062:
[0096] Step S1061, write the rule of mounting the first data disk to the home directory into the system mounting rule description file ( / etc / fstab);
[0097] It can be understood that by writing the rule for mounting the first data disk to the home directory into / etc / fstab, the operation of mounting the first data disk to the home is completed. If the rule for mounting the first data disk to the home is not written into the mount configuration file, that is, the / etc / fstab file, then the user still needs to remount the first data disk when restarting the system.
[0098] Specifically, in an embodiment of the present invention, after the first data disk is mounted to the home directory, the rules for mounting the first data disk to the home are written into the / etc / fstab file, so that when the user starts the system later, the system will actively read the contents of the / etc / fstab file and automatically mount the first data disk to the home directory according to the rule entries in the / etc / fstab file.
[0099] Step S1062: prompt the user to restart the system.
[0100] Specifically, the user is prompted to restart the system, and the redirection configuration takes effect after the system restarts, thereby completing the redirection of the home directory.
[0101] Next, a home directory redirection system proposed according to an embodiment of the present application is described with reference to the accompanying drawings.
[0102] Figure 2 This is a schematic diagram of the structure of a home directory redirection system according to an embodiment of the present application.
[0103] The system specifically comprises:
[0104] The first determination module 201 is used to determine whether the home directory is in the system disk, and if so, prompt the user to send a redirection boot instruction;
[0105] A first prompting module 202, configured to prompt the user to select a first data disk according to the redirection guide instruction;
[0106] The second judgment module 203 is used to judge whether the files in the first data disk and the user directory have been saved and closed, and if so, synchronize the first data to the first data disk to generate second data;
[0107] A third judgment module 204 is used to judge whether the synchronization of the first data is completed by comparing the first data with the second data;
[0108] A second prompting module 205 is used to prompt the user to send a redirection execution instruction if the first data synchronization is completed;
[0109] The user directory redirection module 206 is used to redirect the home directory to the first data disk according to the redirection execution instruction.
[0110] It can be seen that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0111] Reference Figure 3 , an embodiment of the present application provides a home directory redirection device, comprising:
[0112] at least one processor 301;
[0113] At least one memory 302, used to store at least one program;
[0114] When the at least one program is executed by the at least one processor 301, the at least one processor 301 implements the home directory redirection method.
[0115] Similarly, the contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0116] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the application is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are expected, wherein the order of various operations is changed and the sub-operation described as a part of a larger operation is performed independently.
[0117] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present application. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional techniques of the engineer. Therefore, those skilled in the art can implement the present application set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the attached claims and their equivalents.
[0118] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several programs to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0119] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable programs for implementing the logical functions, and may be embodied in any computer-readable medium for use by a program execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch and execute a program from a program execution system, device or apparatus), or in conjunction with such program execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by a program execution system, device or apparatus, or in conjunction with such program execution systems, devices or apparatuses.
[0120] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0121] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable program execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0122] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0123] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
[0124] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments. Technical personnel familiar with the field may make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A user directory redirection method, characterized in that: The following steps are involved: Determine whether the home directory is on the system disk. If so, prompt the user to send a redirection boot command; According to the redirection boot instruction, prompting the user to select a first data disk, where the first data disk is the target partition for redirecting the home directory; Determine whether the files in the first data disk and the user directory have been saved and closed, and if so, synchronize the first data to the first data disk to generate second data, where the first data is the data in the home directory; The determining whether the files in the first data disk and the user directory have been saved and closed, and if so, synchronizing the first data to the first data disk to generate the second data, includes: Display the data synchronization interface and prompt the user to send a data synchronization instruction; According to the data synchronization instruction, save the first mount path to a configuration file of system redirection, wherein the first mount path is a mount path of the first data disk; According to the first mounting path, synchronize the first data to the first data disk, generate the second data, and display the synchronization progress; By comparing the first data with the second data, determining whether the synchronization of the first data is completed; If the first data synchronization is completed, create a soft link according to the first mount path, and prompt the user to send a redirection execution instruction; According to the redirection execution instruction, the home directory is redirected to the first data disk.
2. A home directory redirection method according to claim 1, characterized in that: The step of prompting the user to select a first data disk according to the redirection boot instruction includes: According to the redirection boot instruction, display a data disk list; In response to a data disk selection instruction, the first data disk is selected from the data disk list.
3. A home directory redirection method according to claim 1, characterized in that: The determining whether the files in the first data disk and the user directory have been saved and closed, and if so, synchronizing the first data to the first data disk to generate the second data, further includes: If not, the user is prompted to save and close the first data disk and the files in the user directory.
4. A home directory redirection method according to claim 1, characterized in that: By comparing the first data and the second data, determining whether the first data is synchronized, includes: If not, the user is prompted to resend the data synchronization instruction.
5. A home directory redirection method according to claim 1, characterized in that: The step of redirecting the home directory to the first data disk according to the redirection execution instruction includes: Writing the rule for mounting the first data disk to the home directory into the system mounting rule description file; Prompt the user to restart the system.
6. A method for redirecting a home directory according to claim 5, characterized in that: The determining whether the home directory is on the system disk, and if so, prompting the user to send a redirection boot instruction, further includes: If not, check whether the home directory has been redirected; If yes, obtaining the first mount path through the configuration file, and creating a soft link from the home directory to the first mount path; If not, the redirection process is terminated.
7. A home directory redirection system, characterized in that: include: The first judgment module is used to judge whether the home directory is in the system disk, and if so, prompt the user to send a redirection boot instruction; A first prompting module, configured to prompt a user to select a first data disk according to the redirection boot instruction; The second judgment module is used to judge whether the files in the first data disk and the user directory have been saved and closed. If so, the first data is synchronized to the first data disk to generate the second data, and the first data is the data in the home directory; the judgment whether the files in the first data disk and the user directory have been saved and closed, and if so, the first data is synchronized to the first data disk to generate the second data, including: displaying a data synchronization interface, prompting the user to send a data synchronization instruction; according to the data synchronization instruction, saving the first mount path to the configuration file redirected by the system, the first mount path is the mount path of the first data disk; according to the first mount path, the first data is synchronized to the first data disk, the second data is generated, and the synchronization progress is displayed; A third judgment module, used for judging whether the synchronization of the first data is completed by comparing the first data with the second data; A second prompt module is used to create a soft link according to the first mount path if the first data synchronization is completed, and prompt the user to send a redirection execution instruction; A home directory redirection module is used to redirect the home directory to the first data disk according to the redirection execution instruction.
8. A home directory redirection device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a home directory redirection method as described in any one of claims 1-6.
9. A storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to implement a home directory redirection method as described in any one of claims 1-6 when executed by the processor.
Citation Information
Patent Citations
Prompting method and device
CN109976798A
RELRO security protection-based detection method, terminal and storage medium
CN112182516A
Dynamically redirecting boot to another operating system
US20120284494A1
