Check whether files from openssh-server differ in size, digest, mode, or ownership from the RPM database records.
Do not modify files; display discrepancies only.
Which command is appropriate?
rpm -V compares installed file attributes with the records in the RPM database and reports differences.
Detailed explanation
rpm -qi openssh-serverIncorrect. -qi displays package metadata.
Incorrect. -qi displays package metadata.
rpm -ql openssh-serverIncorrect. -ql lists files without verifying their attributes.
Incorrect. -ql lists files without verifying their attributes.
rpm -V openssh-serverCorrect. rpm -V openssh-server verifies installed files against recorded values.
Correct. rpm -V openssh-server verifies installed files against recorded values.
rpm -e openssh-serverIncorrect. -e removes the package.
Incorrect. -e removes the package.
Try it yourself
An example you can run in a temporary verification environment.
rpm --help | grep -E -- '--verify|-V'Expected result
verify操作の説明。ファイル変更は行わないKey points
- -V means verify
- Only differences are reported
- Output letters identify checked attributes
Notes
- Environment: RPM 4.19〜6.x公式仕様
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.