Rpm query changed files




















In front, we execute rpm -qa Command, you can find that a large number of RPM packages are installed in the Linux system, and each package contains a large number of installation files. Therefore, in order to find the problems of file deletion, file data modification and malicious tampering, Linux provides the following two detection methods:. RPM package verification can be used to determine whether the installed software package or file has been modified. There are three command formats that can be used in this way.

If the RPM package itself has been tampered with, it cannot be verified effectively. Therefore, the second method, RPM digital certificate verification method, needs to be used. Digital certificates, also known as digital signatures, are issued directly by software vendors. After installing the digital certificate in the Linux system, if the RPM package is modified, the digital certificate carried in the package will also change, which will not successfully match the system, and the software cannot be installed.

As you can see, the digital certificate has been successfully installed. When installing RPM package on the system with digital certificate, the system will automatically verify the digital certificate of the package. If it passes the verification, it can be installed. Otherwise, it cannot be installed. To verify a specific package, enter.

To verify the package that contains a specific file, enter. To verify an installed package against the RPM package file, enter. To verify all installed packages, enter. If RPM finds no problems, there will be no output. If any problems are found, RPM will display a file name preceded by a string of eight characters.

Each column of this string specifies whether or not there was a problem with a particular attribute of the file. If a period. If any of the characters in the following table appears, a problem related to that attribute occurred. Column Code Explanation. Here's an example showing that the checksum, size, and permissions are messed up for one of the man files in the hotrod package:.

If you see any output, you can remove and then reinstall the package, or you can fix the problem some other way if you know what to do. Linux Basics. Linux Tutorial 5. Living in a Shell. Root and Other Users. Virtual Consoles. Logoff and Shutdown. Choosing a Shell. The Command Prompt. Command History. Stopping a Program. Environment Variables. Who is Doctor Bob?

What is Linux? History of Unix. Operating Systems. What's Next? Linux Files Linux Commands The Linux File System. Linux File Names. Linux Directories.

Directory Terminology. Navigating the File System. Listing Linux Files. Displaying Linux Files. Copying and Renaming Files. Creating Files and Direct Deleting Files and Direct Linux Files - Wildcards.

The Nine Deadly Keystrokes. Linux File Permissions. Changing File Permissions. Changing Your Password. Switching Users. Who is Logged In? Date and Time. The Echo Command. Spell Checking. Printing Linux Files. Joining Files. Searching for Files. Comparing Files. Task Scheduling. Linking Files. Linux Programming. Linux Data Manipulation Linux Shell Programming 6. Perl Programming 7. Heads or Tails? Sorting Data. Eliminating Duplicates. Selecting Columns. Selecting Records.

This query format is then used to print the information section of a query. The query format is similar to a C style printf string, which the printf 2 man page provides a good introduction to. However, as RPM already knows the type of data that is being printed, you must omit the type specifier. For example, the following RPM command prints the names and sizes of all of the packages installed on a system:.

To change the above command to print the NAME in the first 30 bytes and right align the size to, use:. RPM uses many parallel arrays internally. For example, file sizes and file names are kept as an array of numbers and an array of strings respectively, with the first element in the size array corresponding to the first element in the name array. To iterate over a set of parallel arrays, enclose the format to be used to print each item in the array within square brackets [].



0コメント

  • 1000 / 1000