chemod

Updated: October 26, 2022

Change file extended mode bits (non-POSIX)

Syntax:

chemod [-Rv] [-s | -c mode_bits] path

Runs on:

QNX Neutrino

Options:

-c mode_bits
Clear the bits specified by mode_bits. For more information, see Extended mode bits.
-R
Recursively act on every file and directory under the specified path. Depending on the value provided, -s or -c, this option causes chemod to set or clear the bits on the given path and all files and directories under path.
-s mode_bits
Set the bits specified by mode_bits. For more information, see Extended mode bits.
-v
Enable verbosity. Enables chemod to display the changes that are being performed.
path
Path to modify.

Description:

The chemod utility displays or modifies the extended mode bits of the specified path. The mode_bits variable is a string of characters indicating which bits should be modified. Extended mode bits are currently only supported on the Power-Safe filesystem.

If neither the -c nor the -s option is given, chemod displays the mode_bits value for the given path. If multiple -c or -s options are given, the last one takes effect.

Extended mode bits

The mode_bits value can be any combination of the following characters:

a
This file is affected by the artificial free space limit (alimit=) filesystem value. For more information on how alimit can be used, see fs-qnx6.so.
i
All file modifications are in-place, which disables the Copy-on-Write semantics of the Power-Safe filesystem, for the specified path. This implies a loss of power-loss resilience in the file data.

Examples:

Marks myfile as being affected by the artificial free space limit (alimit=) filesystem value:

chemod -s a myfile

Removes the artificial free space limit (alimit=) from myfile:

chemod -c a myfile

Marks myfile as having the Copy-on-Write semantics of the Power-Safe filesystem disabled, for the specified path. This implies a loss of power-loss resiliency in the file data:

chemod -s i myfile

Marks myfile as having the Copy-on-Write semantics of the Power-Safe filesystem enabled, for the specified path. This allows for power-loss resiliency in the file data:

chemod -c i myfile

Marks myfile as being both affected by the artificial free space limit (alimit=) filesystem value and having the Copy-on-Write semantics of the Power-Safe filesystem disabled, for the specified path:

chemod -s ai myfile