The /usr/bin/p7zip file that is part of the p7zip package has been overwritten. This server is critical
to production and cannot be rebooted. Identify the command that would restore the file without
requiring a reboot.
A.
pkg verify p7zip
B.
pkg fix p7sip
C.
pkg rebuild-index p7zip
D.
pkg revert p7zip
E.
pkg uninstsll p7zip
F.
pkg install p7zip
G.
pkg install –no-backup-be p7sip
H.
pkg refresh p7zip
Explanation:
Use the pkg revert command to restore files to their as-delivered condition.
Reference: Adding and Updating Oracle Solaris 11 Software Packages, Restoring a File
D
D is incorrect.
Correct answer is is [B] :
root@sol11-ai:/# cp /usr/bin/sh /usr/bin/p7zip
root@sol11-ai:/# pkg verify p7zip
PACKAGE STATUS
pkg://solaris/compress/p7zip ERROR
file: usr/bin/p7zip
Size: 2189920 bytes should be 2512
Hash: 69936ffe92bb8ad5f95867ee7081943f89a89707 should be 22818fdc4a3a3d9f85ceacb8a85bf084d4d67889
root@sol11-ai:/# pkg revert p7zip
pkg revert: The following files are not packaged in this image:
p7zip
root@sol11-ai:/# pkg verify p7zip
PACKAGE STATUS
pkg://solaris/compress/p7zip ERROR
file: usr/bin/p7zip
Size: 2189920 bytes should be 2512
Hash: 69936ffe92bb8ad5f95867ee7081943f89a89707 should be 22818fdc4a3a3d9f85ceacb8a85bf084d4d67889
root@sol11-ai:/# pkg fix p7zip
Verifying: pkg://solaris/compress/p7zip ERROR
file: usr/bin/p7zip
Size: 2189920 bytes should be 2512
Hash: 69936ffe92bb8ad5f95867ee7081943f89a89707 should be 22818fdc4a3a3d9f85ceacb8a85bf084d4d67889
Created ZFS snapshot: 2015-04-28-09:16:47
Repairing: pkg://solaris/compress/p7zip
Creating Plan (Evaluating mediators): –
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 1/1 1/1 0.0/0.0 0B/s
PHASE ITEMS
Updating modified actions 1/1
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
root@sol11-ai:/# pkg verify p7zip
B…