linux基礎命令---umask
umask
指定建立檔案時所需要的許可權掩碼,掩碼的執行許可權對於檔案沒有效果。如果模式以數字開頭,則解釋為八進位制數字;否則解釋為符號模式掩碼,類似於chmod(1)所接受的模式掩碼。如果省略模式,則列印掩碼的當前值。
此命令的適用範圍:RedHat、RHEL、Ubuntu、CentOS、SUSE、openSUSE、Fedora。
1、語法
umask [選項] mask
2、選項列表
選項 |
說明 |
-S |
以字元方式表示許可權掩碼 |
-P |
顯示當前許可權掩碼 |
3、例項
1)檢視mask,建立目錄
|
2)建立檔案
|
3)修改掩碼,建立目錄
|