HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)

c
chatr(1) chatr(1)
chatr +b enable +xyz enable returns 5 (because of illegal option
+xyz).
chatr +b enable +xyz enable +mno file1 file2
returns 8.
For PA-RISC 64-bit
chatr, if you use an illegal option, chatr returns the number of non-option words
present after the first illegal option.
chatr +b enable +xyz enable +mno enable +pqr enable file
returns 4.
Invalid arguments
If you use an invalid argument with a valid option and you do not specify a file name, both PA-RISC 32-bit
and 64-bit
chatr return 0.
chatr +b <no argument> returns 0.
For PA-RISC 32-bit
chatr, if you specify a file name (regardless of whether or not the file exists),
chatr
returns number of words in the command line.
chatr +b <no argument> file returns 4.
For PA-RISC 64-bit
chatr, if you specify a file name (regardless of whether or not the file exists),
chatr
returns the number of files specified.
chatr +b <no argument> file1 file2 file3 returns 3.
Invalid files
For both PA-RISC 32-bit and 64-bit chatr, if the command cannot act on any of the files given, it returns
the total number of files specified (if some option is specified). Otherwise it returns the number of files
upon which it could not act.
chatr +b enable a1 a2 a3 a4 (where a2 does not have read/write permission) returns 4.
chatr a1 a2 a3 a4 returns 1.
EXTERNAL INFLUENCES
Environment Variables
The following internationalization variables affect the execution of
chatr:
LANG Determines the locale category for native language, local customs and coded character
set in the absence of LC_ALL and other LC_* environment variables. If LANG is not
specified or is set to the empty string, a default of C (see lang(5)) is used instead of
LANG.
LC_ALL Determines the values for all locale categories and has precedence over LANG and other
LC_* environment variables.
LC_CTYPE Determines the locale category for character handling functions.
LC_MESSAGES Determines the locale that should be used to affect the format and contents of diagnostic
messages written to standard error.
LC_NUMERIC Determines the locale category for numeric formatting.
NLSPATH Determines the location of message catalogues for the processing of LC_MESSAGES .
If any internationalization variable contains an invalid setting, chatr behaves as if all internationalization
variables are set to
C. See environ(5).
In addition, the following environment variable affects chatr:
TMPDIR Specifies a directory for temporary files (see tmpnam(3S)).
EXAMPLES
Change a.out to demand-loaded
chatr -q a.out
Change binding mode of program file that uses shared libraries to immediate and nonfatal. Also enable
usage of SHLIB_PATH environment variable:
chatr -B immediate -B nonfatal +s enable a.out
Disallow run-time path lookup for the shared library /usr/lib/libc.sl that the shared library
libfoo.sl depends on:
Section 178 Hewlett-Packard Company 6 HP-UX 11i Version 1: September 2005