Home » Oracle » 1z0-821 » Which two commands would display .my software updates that are available in the default Oracle repository?
You need to make sure that all of the software packages on your server are up to date. Without installing any updates, which two commands would display .my software updates that are available in the default Oracle repository?
A. pkg list -u
B. pkg verify -u ‘*’
C. pkg search -u
D. pkg info -r ‘*’
E. pkg install -nv
F. pkg update -nv ‘*’
Correct Answer: AD
Explanation/Reference:
Explanation:
A: the pgk list command display a list of packages in the current image, including state and other information. By default, package variants for a different architecture or zone type are excluded.
D: pkginfo displays information about software packages that are installed on the system (with the first synopsis, with -l) or that reside on a particular device or directory (with the second synopsis, with -r).
Without options, pkginfo lists the primary category, package instance, and the names of all completely installed and partially installed packages. It displays one line for each package selected.
With -r, retrieve the data from the repositories of the image’s configured publishers. Note that you must specify one or more package patterns in this case.
Download Printable PDF. VALID exam to help you PASS.
|
|
root@test:~# pkg install -nv
pkg install: at least one package name required
Usage:
pkg install [-nvq] [-C n] [-g path_or_uri …] [–accept]
[–licenses] [–no-be-activate] [–no-index] [–no-refresh]
[–no-backup-be | –require-backup-be] [–backup-be-name name]
[–deny-new-be | –require-new-be] [–be-name name]
[-r [-z zonename … | -Z zonename …]]
[–sync-actuators | –sync-actuators-timeout timeout]
[–reject pkg_fmri_pattern … ] pkg_fmri_pattern …
root@test:~# pkg update -nv
No updates available for this image.
root@test:~# pkg list -u
no packages have newer versions available
Do you mean A and F is correct?
Just to sum it up – A and D are correct answers, but F would also give a correct answer in case there are newer packages supported by current incorporation (!!!) Whereas pkg info -r ‘*’ would give absolutely every available package.
And IMHO even better option would be to use pkg list -a | grep “mypackage” e.g:
# pkg list -a |grep ghostscript
print/filter/ghostscript (solaris) 9.0-0.175.3.11.0.5.0 i–
print/filter/ghostscript-core (solaris) 9.26-11.4.5.0.1.2.0 —
print/filter/ghostscript/fonts/gnu-gs-fonts-other (solaris) 6.0-0.175.3.0.0.30.0 —
print/filter/ghostscript/fonts/gnu-gs-fonts-std (solaris) 6.0-0.175.3.0.0.30.0 —
To elaborate a bit more on my previous comment – it will actually show newer versions with the warning when run like this:
# pkg update -nv ghostscript@latest
Creating Plan (Solver setup): \
pkg update: No matching version of print/filter/ghostscript can be installed:
Reject: pkg://solaris/print/filter/[email protected]
Reason: This version is excluded by installed incorporation consolidation/userland/[email protected]
Well there is a twist to this -nv options to the install and update would not install any packages, so doing install .my@latest also would give an idea of whether there are updates ( they would not show if the incorporation is not supported in current environment, but the is also true for pkg list -u command !!!)