umask
Shell builtin: umask
Shows or sets the mask for new files.
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
Examples
umask
0022
umask -S
u=rwx,g=rx,o=rx
touch new.txt && mkdir newdir && stat -c %a new.txt newdir
644
755 Where you learn it
Lessons
- Owners and the starting mode Linux Basics, Module 5: Permissions and sudo