1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 08:55:07 +00:00

mkdir: Use FilePermissionsMask to handle mode option

This commit is contained in:
Xavier Defrang 2021-12-25 11:40:38 +01:00 committed by Brian Gianforcaro
parent 005b0f7384
commit b17fef5133
2 changed files with 17 additions and 13 deletions

View file

@ -15,13 +15,15 @@ Create a new empty directory for each of the given *directories*.
## Options
* `-p`, `--parents`: Create parent directories if they don't exist
* `-m`, `--mode`: Sets the permissions for the final directory (possibly altered by the process umask). The mode argument must be given in octal format.
* `-m`, `--mode`: Sets the permissions for the final directory (possibly altered by the process umask). The mode argument can be given in any of the formats
accepted by the chmod(1) command. Addition and removal of permissions is relative to a default permission of 0777.
## Examples
```sh
$ mkdir -p /tmp/foo/bar
$ mkdir -m 0700 /tmp/owner-only
$ mkdir -m a=rx /tmp/foo/bar
```
## See also