Skip to Content
gnux

-m, --mode

Set permission mode (as in chmod) to MODE, instead of rwxr-xr-x.

An option of installx.

Usage

installx -m MODE SOURCE... DEST
installx --mode=MODE SOURCE... DEST

Details

ShortLongValueDefaultMeaning
-m--modeMODEset permission mode (as in chmod) to MODE, instead of rwxr-xr-x

Examples

Install a configuration file readable by its owner only

installx -m 600 app.conf ~/.config/app/app.conf

Use a symbolic mode

installx -m u=rw,go=r README.md /opt/app/README.md

Create directories with a given mode

installx -d -m 750 /srv/app/logs /srv/app/data

Leave unchanged files untouched

installx -C -m 644 docs/*.md /usr/share/doc/app/

Install a new binary but keep numbered copies of the ones it replaces

installx --backup=numbered -m 755 build/tool /usr/local/bin/tool

Help in the terminal

gnux help installx --mode

On this page