Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


chmod command (changes the file read-only attribute setting (enable or disable))

Organization of this page

Format

chmod [-fhR] mode path-name

You can create this command by using the script_chmod1 sample script file as the base. For details about how to create the command, see 2.6.6(2) Preparations for using the script-format UNIX-compatible commands (Windows only).

Description

This command changes the file read-only attribute setting (enable or disable).

Use this command when you want to suppress updating of files.

Arguments

-f

Ignores the specification.

-h

Ignores the specification.

-R

Ignores the specification.

mode

Specifies the mode as a symbol or a numeric value and enables or disables the read-only attribute. The table below explains how to specify this option. If any other mode is specified, the command outputs chmod: invalid file mode: mode to the standard error output, in which case the access permissions remain unchanged.

Specification

Symbol

Numeric value

Disabling the read-only attribute and permitting write operations

(equivalent to when the execution results of the adshscripttool -fmode -s w command are AAA or RRR)

+w specified

Numeric value that turns on write permission mode bits u, g, and o (such as 777, 666, 333, 222, and 733)

Enabling the read-only attribute and prohibiting write operations

(equivalent to when the execution results of the adshscripttool -fmode -s w command are DDD)

-w specified

Numeric value that turns off write permission mode bits u, g, and o (such as 555, 444, 111, 000, and 511)

path-name

Specifies the target file. You can specify multiple files. A folder cannot be specified.

Return code

Return code

Meaning

0

Normal termination

1 or greater

Error termination

Notes

Usage examples

The following shows example definitions of job definition scripts. These examples assume that the chmod command has been created by using the script_chmod1 sample script file as the base.