Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > C


HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


cpset — install object files in binary directories


cpset [-o] object directory [- mode [- owner [- group]]]


The cpset command installs the specified object file in the given directory. The mode, owner, and group, of the destination file can be specified on the command line. If this data is omitted, two results are possible:

  • If you have administrative permissions (that is, your numerical ID is less than 100), the following defaults are provided:







  • If you do not have administrative permissions, the default mode, owner, and group of the destination file are the same as yours.

The -o option forces cpset to move object to OLDobject in the destination directory before installing the new object.

cpset reads the /etc/src/destinations file to determine the final destination of the file to be installed. The destinations file contains pairs of path names separated by spaces or tabs. The first name is the "official" destination (for example: /usr/bin/echo). The second name is the new destination. If echo is moved from /usr/bin to /usr/local/bin, the entry in destinations would be:

/usr/bin/echo /usr/local/bin/echo

When the actual installation happens, cpset verifies that the "old" pathname does not exist. If a file exists at that location, cpset issues a warning and continues.

This file does not exist on a distribution tape; it is used by sites to track local command movement. The procedures used to build the source are responsible for defining the "official" locations of the source.

Cross Generation

The environment variable ROOT is used to locate the destination file (in the form $ROOT/etc/src/destinations). This is necessary in the cases where cross generation is being done on a production system.


If you are an administrator, all of the following examples have the same effect. They copy file echo into /usr/bin with mode, owner, and group set to 0555, bin, bin, respectively:

cpset echo /usr/bin 0555 bin bin cpset echo /usr/bin cpset echo /usr/bin/echo

If you are not an administrator, the last two examples set mode, owner, and group to your current values.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.