pkgchk



System Administration Commands                         pkgchk(1M)

NAME

pkgchk - check package installation accuracy

SYNOPSIS

pkgchk [-l | -acfnqvx] [-i file | -] [-p path... | -P partial- path...] [-R root_ path] [ [-m pkgmap [-e envfile]] | pkginst... | -Y category, category...] pkgchk -d device [-l | -fv] [-i file | -] [-M] [-p path]... [-V fs_ file] [pkginst... | -Y category[, category...]]

DESCRIPTION

pkgchk checks the accuracy of installed files or, by using the -l option, displays information about package files. pkgchk checks the integrity of directory structures and files. Discrepancies are written to standard error along with a detailed explanation of the problem. The first synopsis defined above is used to list or check the contents and/or attributes of objects that are currently installed on the system, or in the indicated pkgmap. Package names may be listed on the command line, or by default, the entire contents of a machine will be checked. The second synopsis is used to list or check the contents of a package which has been spooled on the specified device, but not installed. Note that attributes cannot be checked for spooled packages.

OPTIONS

The following options are supported: -a Audit the file attributes only and do not check file contents. Default is to check both. -c Audit the file contents only and do not check file attributes. Default is to check both. -d device Specify the device on which a spooled package resides. SunOS 5.10 Last change: 30 Oct 2007 1 System Administration Commands pkgchk(1M) device can be a directory path name or the identifiers for tape, floppy disk, or removable disk (for example, /var/tmp or /dev/diskette). -e envfile Request that the package information file named as envfile be used to resolve parameters noted in the specified pkgmap file. -f Correct file attributes if possible. If used with the -x option, this option removes hidden files. When pkgchk is invoked with this option, it creates directories, named pipes, links, and special devices if they do not already exist. If the -d option calls out an uninstalled pack- age, the -f option will only take effect if the package is in directory (not stream) format. All file attributes will be set to agree with the entries in the pkgmap file except that setuid, setgid, and sticky bits will not be set in the mode. -i file | - Read a list of path names from file or from stdin (-) and compare this list against the installation software database or the indicated pkgmap file. Path names that are not contained in file or stdin are not checked. -l List information on the selected files that make up a package. This option is not compatible with the -a, -c, -f, -g, and -v options. -m pkgmap Check the package against the package map file, pkgmap. -M Instruct pkgchk not to use the $ root_ path/etc/vfstab file for determining the client's mount points. This option assumes the mount points are correct on the server and it behaves consistently with Solaris 2.5 and SunOS 5.10 Last change: 30 Oct 2007 2 System Administration Commands pkgchk(1M) earlier releases. -n Do not check volatile or editable files' contents. This should be used for most post-installation checking. -p path Check the accuracy only of the path name or path names listed. path can be one or more path names separated by commas (or by whitespace, if the list is quoted). To specify a path that includes a comma, you must use the -i option, described above. See EXAMPLES. -P partial- path Check the accuracy of only the partial path name or path names listed. partial- path can be one or more partial path names separated by commas (or by whitespace, if the list is quoted). This option can be used instead of -p and is not compatible with the other option. This option matches any path name that contains the string contained in the partial path. See the note about paths that con- tain commas in the description of -p. -q Quiet mode. Do not give messages about missing files. -R root_ path Define the full name of a directory to use as the root_ path. All files, including package system informa- tion files, are relocated to a directory tree starting in the specified root_ path. The root_ path may be speci- fied when installing to a client from a server (for example, /export/root/client1). Note - The root file system of any non-global zones must not be referenced with the -R option. Doing so might dam- age the global zone's file system, might compromise the security of the global zone, and might damage the non-global zone's file system. See zones(5). SunOS 5.10 Last change: 30 Oct 2007 3 System Administration Commands pkgchk(1M) -v Verbose mode. Files are listed as processed. -V fs_ file Specify an alternative fs_ file to map the client's file systems. For example, used in situations where the $ root_ path/etc/vfstab file is non-existent or unreli- able. -x Search exclusive directories, looking for files which exist that are not in the installation software database or the indicated pkgmap file. -Y category Check packages based on the value of the CATEGORY param- eter stored in the installed or spooled package's pkginfo(4) file.

OPERANDS

pkginst The package instance or instances to be checked. The format pkginst.* can be used to check all instances of a package. The default is to display all information about all installed packages. The asterisk character (*) is a special character to some shells and may need to be escaped. In the C-Shell, an asterisk must be surrounded by single quotes (') or preceded by a backslash (\); partial- path A portion of a path, such as a file or directory name.

EXAMPLES

Example 1 Using pkgchk for Displaying Package Installation Information SunOS 5.10 Last change: 30 Oct 2007 4 System Administration Commands pkgchk(1M) The following example displays package installation informa- tion for /usr/bin/ls: example% pkgchk -l -p /usr/bin/ls Example 2 Checking on Java Font Properties The following example displays package installation informa- tion for all Java font properties installed on the system. example% pkgchk -l -P font.properties Example 3 Specifying a Path That Contains a Comma Assume you want to specify the path: /platform/SUNW,Netra-T12/lib List this path in a file. Here is one way in which you can do that: example% echo "/platform/SUNW,Netra-T12/lib" > /tmp/p You can then enter: example% pkgchk -i /tmp/p -l Pathname: /platform/SUNW,Netra-T12/lib Type: directory Expected mode: 0755 Expected owner: root Expected group: bin Referenced by the following packages: SUNWcar Current status: installed SunOS 5.10 Last change: 30 Oct 2007 5 System Administration Commands pkgchk(1M)

EXIT STATUS

0 Successful completion. >0 An error occurred.

ATTRIBUTES

See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________ |_____________________________ | | Availability | SUNWcsu | |_____________________________ |_____________________________ |

SEE ALSO

pkginfo(1), pkgtrans(1), pkgadd(1M), pkgask(1M), pkgrm(1M), pkginfo(4), attributes(5), largefile(5)

NOTES

Package commands are largefile(5)-aware. They handle files larger than 2 GB in the same way they handle smaller files. In their current implementations, pkgadd(1M), pkgtrans(1) and other package commands can process a datastream of up to 4 GB. SunOS 5.10 Last change: 30 Oct 2007 6 No manual entry for 1.
? 1994 Man-cgi 1.15, Panagiotis Christias

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24989466/viewspace-1188074/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24989466/viewspace-1188074/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值