terminal.cab

All commands

umask

Topic: Permissions and ownership

Shell builtin: umask

Shows or sets the mask for new files.

Package: core-shell

Usage

umask [-p] [-S] [mode]

Description

Show or set the mask for new files, octal (022) or like chmod (u=rwx,g=rx,o=).

Options in the simulator

No options.

2 more options of the real program, not in the simulator yet
  • -p not in the simulator yet

    Explanation to come

  • -S not in the simulator yet

    Explanation to come

Examples

From the lesson Owners and the starting mode
umask
0022
umask -S
u=rwx,g=rx,o=rx
touch new.txt && mkdir newdir && stat -c %a new.txt newdir
644
755

Try it in the terminal

Where you learn it

Lessons

All commands