umask - set or report file mode creation mask
umask [-S] [mask]
The umask(1) command sets or reports the file mode creation mask for the current shell execution environment. The file mode creation mask is used to determine the initial value of a file's permissions when it is created.
The following option is available:
The output format for -S is:
"u=%s,g=%s,o=%s\n", owner perms, group perms, other perms
The mask argument can be specified as either a symbolic mode, or (obsolescent) octal number. See the discussion of modes in the chmod(1) reference page. The file mode creation mask of the shell execution environment will be set according to the mask argument. For a symbolic mode value, the new value of the file mode creation mask will be the logical complement of the file permissions portion of the file mode specified as a symbolic mode.
The output from an invocation of umask(1) without a mask argument can be used as input to another invocation of umask(1).
If the mask argument is not given, umask(1) writes the value of the current file mode creation mask to standard output.
To clear all write bits, you must use umask -- -w.
chmod(1)